Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Formatting Of Values

Hi   I am looking for a tip regarding the below visual.   1. Does anyone know which visual it is (screen "Goal")? It doesn't seem to be a standard matrix. 2. How can I format various metrics in ...
  • tex628's avatar
    6 years ago

    Hi Anonymous ,

    The visual in your "Goal" image looks like the standard matrix. 

    A single measure can only have a single data format. What you're seeing in that image is text formatting using the FORMAT() dax formula. 

    Take a quick look at this link:
    https://docs.microsoft.com/sv-se/dax/pre-defined-numeric-formats-for-the-format-function 

    Essentially this relies on the fact that you have numeric values of different types calculated and then you use a SWITCH() together with several different FORMAT()s to define how you want your numbers to be displayed. 

    Hope this helps,

    J

  • v-zhenbw-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    In addition, we can create a measure to replace your value to meet your requirement.

     

    Measure Value = 
    FORMAT(
        SUM('Table'[Value]),
        SWITCH (
            TRUE (),
            MAX('Table'[Metric])="AGM%", "Percent",
            MAX('Table'[Metric])="AGM","Currency",
            MAX('Table'[Metric])="Acquire/Divest","General Number"
        )
    )

     

     

    You can also refer to the post I answered earlier.

     

    https://community.powerbi.com/t5/Desktop/How-to-create-a-visual-like-this/td-p/1084043

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ zhenbw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.