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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Super User
Super User

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
Super User
Super User

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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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