Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 one column after unpivoting. In the matrix, they are showing as general decimal numbers, while I need them to show currency, percentages, etc...
So here's my current data structure
| Plant | Month Number | Month Name | Metric | Actual Value |
| Michigan | 1 | January | Production Sales | $100.00 |
| Michigan | 1 | January | Sales Goal | 100% |
And I have two of these tables, one that's Goals and one that's Actuals.
Then in my matrix they present as:
Rows: Metric
Column: Month Name
Values: Actual Value, Goal Value
| Month Name | January | |
| Metric | Actual | Goal |
| Production Sales | 100 | 100 |
| Sales Goal | 1.00 | 1.00 |
Just looking for some help, ideally don't want to use it as text but not sure if I can pivot some other way.
Thank you!
Solved! Go to Solution.
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.
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.
Hi @JP_G ,
On the fields themselves you can change the formatting on how they display. One way is to just select the field and then customize how it appears.
As for the order in the matrix itself, just change which field is "Rows" vs "Columns" vs "Values"
Proud to be a Datanaut!
Private message me for consulting or training needs.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |