Forum Discussion
JP_G
1 year agoFrequent Visitor
Multiple Data Formats in Matrix
Hello, I was looking for some continued help on my Matrix I'm building: My original thread I was able to get the data to display in the Matrix very well however, now that the values are all in o...
- 1 year ago
Hi JP_G ,
Power BI does not support applying multiple formats to a single column directly. However, you can use a DAX measure to dynamically format your values.
Create a new measure for Formatted Actual Value:
Formatted Actual Value = SWITCH( TRUE(), SELECTEDVALUE('Table'[Metric]) = "Production Sales", FORMAT(SUM('Table'[Actual Value]), "$#,##0.00"), SELECTEDVALUE('Table'[Metric]) = "Sales Goal", FORMAT(SUM('Table'[Actual Value]), "0%"), FORMAT(SUM('Table'[Actual Value]), "#,##0.00") )Create a similar measure for Formatted Goal Value:
Formatted Goal Value = SWITCH( TRUE(), SELECTEDVALUE('Table'[Metric]) = "Production Sales", FORMAT(SUM('Table'[Goal Value]), "$#,##0.00"), SELECTEDVALUE('Table'[Metric]) = "Sales Goal", FORMAT(SUM('Table'[Goal Value]), "0%"), FORMAT(SUM('Table'[Goal Value]), "#,##0.00") )Replace the Actual Value and Goal Value fields in the matrix with the respective formatted measures.
Outcome: This will display the values with the correct formats in your matrix.
Please mark this as solution if it helps you. Appreciate kudos.