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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Using different string formatting in specific rows in Matrix

My matrix roughly looks like this: 

KPIUnit1Unit2Unit3
KPI10.2%0.4%0.6%
KPI20.3%0.5%0.7%
KPI32.0%3.0%4.0%

 

I need KPI2's units to be in pp format. so in this case, KPI2:Unit1 should read 0.3pp and all the same for the other units; but it should stay the same for the other KPIs. The data is all in one table, and must be the same order as above. 

 

The resulting matrix visual that I'm looking for would roughly look like this: 

KPIUnit1Unit2Unit3
KPI10.2%0.4%0.6%
KPI20.3pp0.5pp0.7pp
KPI32.0%3.0%4.0%

 

Any help would be appreciated.

1 ACCEPTED SOLUTION
NaveenGandhi
Memorable Member
Memorable Member

Hi @Anonymous 

Pleasue use below DAX.

Unit1 % =

Var unit = DIVIDE(sum('Table'[Unit1]),CALCULATE(sum('Table'[Unit1]),ALL('Table')))

RETURN if(SELECTEDVALUE('Table'[KPI])="KPI2",FORMAT(unit,"0.0"&"pp"),FORMAT(unit,"Percent"))
NaveenGandhi_0-1721329125073.png



Let me know if thist helps.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!



View solution in original post

1 REPLY 1
NaveenGandhi
Memorable Member
Memorable Member

Hi @Anonymous 

Pleasue use below DAX.

Unit1 % =

Var unit = DIVIDE(sum('Table'[Unit1]),CALCULATE(sum('Table'[Unit1]),ALL('Table')))

RETURN if(SELECTEDVALUE('Table'[KPI])="KPI2",FORMAT(unit,"0.0"&"pp"),FORMAT(unit,"Percent"))
NaveenGandhi_0-1721329125073.png



Let me know if thist helps.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.