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

Measure (formatted as Text) won't display in visual - workaround?

Hi there.

 

When building a report, I had a number of values within the dataset that varied - some percentages, some decimals, others whole numbers. The only way that I could manage to get to display them all in a matrix was to use some SWITCH Dax...

 

Formatted Value (Headline) =
VAR Val = SUM ( 'Guardian Master (Unpivoted)'[Value] )
RETURN
SWITCH (
SELECTEDVALUE ( 'Attribute Sort Order 2'[Attribute] ),
"Guardian Score", FORMAT ( Val, "0.0%" ), "Satisfied with Teaching", FORMAT ( Val, "0.0%" ), "Satisfied with Course", FORMAT( Val, "0.0%"), "Continuation", format (Val, "0.0%"), "Expenditure per Student (FTE)", format (Val, "0"), "Career Prospects", format (Val, "0.0%"), "Average Entry Tariff", format(Val,"0"), "Satisfied with Assessment", format (Val, "0.0%" ), "Student:Staff Ratio", format (Val, "0.0"), "Value Added Score", format (Val,"0")
)

 

Now I have found that because the Measure is formatted as Text, I'm unable to drop that Measure into the Value field of any chart.

 

When I try to drop in the original value, then generally incorrect values are output, as these were all decimals. So in the DAX example above,

'Guardian Score' outputs as a decimal, rather than a percentage.

 

What I need to be able to do is hopefully drop in a Measure to a value field that outputs the formats in the DAX above - can anyone advise a way of amending the DAX to achieve this, or suggest another method that would achieve the same result.

 

Example of how this is displayed in a matrix..

 

PowerBiComm.png

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Once formatted as Text, you won't be able to use it in a Value field well of many visuals as those need to be numeric or an aggregation of a text column (first, etc.). Perhaps try custom format strings. All the formatting, none of the "change to text": https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389



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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.