Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 a different way (dollars, whole number, percentage) based on my dataset? Please note that I can pivot/unpivot columns - that is not a problem.

 

My ultimate goal is that I have various metrics in column "Metric" and some of them should be shown as a percentage, some other ones as value or as a dollar.

 

thank you

 

Goal:

Goal01.JPG

 

My Matrix:

My01.JPG

 

My dataset:

 

Business UnitAccount Desc.MetricPeriodScenarioValue
YHZAGMAcqDivAcquire/DivestSaturday, February 1, 2020Actual14
YYYAGMAcqDivAcquire/DivestSaturday, February 1, 2020Actual14
ZZZAGMAcqDivAcquire/DivestSaturday, February 1, 2020Actual14
YHZAGMAcqDivAcquire/DivestWednesday, January 1, 2020Actual13
YYYAGMAcqDivAcquire/DivestWednesday, January 1, 2020Actual13
ZZZAGMAcqDivAcquire/DivestWednesday, January 1, 2020Actual13
YHZAGMAcqDivAcquire/DivestSunday, March 1, 2020Actual13
YYYAGMAcqDivAcquire/DivestSunday, March 1, 2020Actual13
ZZZAGMAcqDivAcquire/DivestSunday, March 1, 2020Actual13
YHZAGMAcqDivAcquire/DivestWednesday, April 1, 2020Actual13
YYYAGMAcqDivAcquire/DivestWednesday, April 1, 2020Actual13
ZZZAGMAcqDivAcquire/DivestWednesday, April 1, 2020Actual13
YHZAGMAcqDivAcquire/DivestFriday, May 1, 2020Actual13
YYYAGMAcqDivAcquire/DivestFriday, May 1, 2020Actual13
ZZZAGMAcqDivAcquire/DivestFriday, May 1, 2020Actual13
ABCDTradeAGMAGMWednesday, January 1, 2020Actual4345
ABCDTradeAGMAGMSaturday, February 1, 2020Actual4840
ABCDTradeAGMAGMSunday, March 1, 2020Actual4565
ABCDTradeAGMAGMWednesday, April 1, 2020Actual5418
ABCDTradeAGMAGMFriday, May 1, 2020Actual4340
EFGTradeAGMAGMWednesday, January 1, 2020Actual1643
EFGTradeAGMAGMSaturday, February 1, 2020Actual1892
EFGTradeAGMAGMSunday, March 1, 2020Actual1787
2 ACCEPTED SOLUTIONS
tex628
Community Champion
Community Champion

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


Connect on LinkedIn

View solution in original post

v-zhenbw-msft
Community Support
Community Support

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"
    )
)

 

For1.jpg

 

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.

View solution in original post

2 REPLIES 2
v-zhenbw-msft
Community Support
Community Support

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"
    )
)

 

For1.jpg

 

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.

tex628
Community Champion
Community Champion

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


Connect on LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.