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