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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ignas
Advocate II
Advocate II

Combining percentage and non percentage values in a matrix

Hello

 

I have some metric values in percentage and other as whole number:

Capture.JPG

Is there any way to display them in the same table?


The problem is that metrics with whole numbers are estimated as Cumulative total, but metrics with percentages as averages.

 

The report file: https://mega.nz/#!vzRG2SbZ!fUsbJcOa7iqsMxXksiiUl70pUSbfuZ3Relvr2q_CtVg

 

Regards,

 

Ignas

 

 

 

7 REPLIES 7
Greg_Deckler
Community Champion
Community Champion

I have done this, the trick is to use a SWITCH or IF statement coupled with FORMAT statements.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hey Greg,

 

Thank you for the answer. Do you have anywhere the example? Or maybe you can do one example in my report?

Basically:

 

Measure =
IF(
     HASONEVALUE('Table'[Metric]), 
     SWITCH(
          MAX('Table'[Metric]),
          "something something %",FORMAT([Measure],"Percent"),
          "something something not %",[Measure]
     ),
     BLANK()
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hello @Greg_Deckler


Even though it solved the issue in the table as we format percentages as text, but it does not solve if I want to display newly created variable in graph.

Capture.JPG

A1 will always remain N/A as it is formated as Text. Do you know if there is anything else that could fulfill my needs?

 

Regards,

 

Ignas

 

@ignas- Well, I suppose that you could create a measure to only return a value for A1 and format it as a measure using the Model tab (not using FORMAT) and another measure to only return a value for B1 and format it as a number (don't use FORMAT) and put both of them as Values in your column chart. That might get you there, basically

 

Check if you are working with A1, if so, return something otherwise BLANK. Repeat for B1.

 

It's an odd one, most people don't compare percents to numbers. I have to believe that whatever story you are trying to convey, there's a better way to do it.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler

 

Thanks alot again.

I tried it also and unfortunately it does not work as it displays the graph axis with either percentage or whole number depending which one is the fist in Column values:

Capture.JPG

 

If you still have any idea you are more than welcome to tell me, because it seems that I tried everything.

Thank you a lot for all of your help

 

Here is a file just in case: https://mega.nz/#!zvITnaqZ!kHJ3BLvl6mADmCFava953pCyWIpKEHvYckPAZwgVw1A

Regards,

 

Ignas

 

 

Hello @Greg_Deckler

 

Thank you a lot. It indeed worked. I appreciate for your help.


Regards,

 

Ignas

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors