Using custom units for columns in azure monitor workbooks charts

PAVAN SIDDHARTH E 26 Reputation points
2022-06-21T10:04:05.147+00:00

In azure monitor workbook chart settings, in custom formatting in y axis settings, there is a list of units available in the drop-down for use. Is there a way to use custom units for the columns using the data from log analytics workspace query

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
247 questions
Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
1,827 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Blumhardt 6,636 Reputation points Microsoft Employee
    2022-06-21T12:40:34.407+00:00

    You can set your query output values in the preferred format. This drop down just makes conversions a little easier. You can use math to change the numeric value or string concatenation to add a symbol to the result.

    | project Count = strcat(tostring(count_/100), " $")


  2. AnuragSingh-MSFT 10,081 Reputation points Microsoft Employee
    2022-06-23T09:54:47.13+00:00

    Hi @PAVAN SIDDHARTH E ,

    As mentioned by Andrew above, you can use Project to format the output as per your requirement. Following are 2 other methods that you can use

    1. Summarize Operator - The output from Summarize is a table which can either be printed as ouput OR you could do further operation on the returned table. For example, consider the following:

    InsightsMetrics  
    | project Computer, Namespace, Name, Val  
    | summarize total=sum(Val) by Computer, Namespace, Name  
    | project totalk = total/1000, Computer, Namespace, Name, total                      //totalk is the formatted column based on the output from Summarize  
    

    2. extend operator - It creates calculated columns and append them to the result set. In order words, you can add a new column based on some caclulation/operation to the result that you have and perform operation based on that as well. Consider the following example

    InsightsMetrics  
    | project Computer, Namespace, Name, Val  
    | extend value_devideBy1000=Val/1000              //a new column added that  
    | summarize sum(value_devideBy1000) by Computer, Namespace, Name  
    

    Thus you can combine summarize and extend operator in your query to get the format as you like. Please let me know if you have any questions.

    ---
    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.