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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
JP_G
Frequent 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 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

PlantMonth NumberMonth NameMetricActual Value
Michigan1JanuaryProduction Sales$100.00
Michigan1JanuarySales Goal100%

 

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 NameJanuary
MetricActualGoal
Production Sales100100
Sales Goal1.001.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!

 

1 ACCEPTED SOLUTION
FarhanJeelani
Super User
Super User

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.

  1. 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")
    )
  2. 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")
    )
  3. 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.

View solution in original post

2 REPLIES 2
FarhanJeelani
Super User
Super User

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.

  1. 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")
    )
  2. 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")
    )
  3. 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.

collinq
Super User
Super User

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.

 

collinq_0-1736453008382.png

 

As for the order in the matrix itself, just change which field is "Rows" vs "Columns" vs "Values"




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors