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! Request now

Reply
Anonymous
Not applicable

Can you set a data format (percentage) within DAX?

I'm currently using a parameter to switch the metric being displayed on a time series chart. However, one format is in dollars, while the other is in percent. The client really wants the percentages to be displayed in the XX.X% formatt. Is there any way I can achieve this within DAX code for the measure? Or in any other way really. 

 

Here is the code for the measure. 
Metric =
IF('Parameter'[Parameter Value]="Dollars",
    SUM('Table'[Dollars]),
    SUM('Table'[Percent]))

 

Please note that I am already using Field Parameters for this Metric, as there are three categories for the metric and the user needs to be able to choose which metrics they want displayed. 

 

2 REPLIES 2
Mahesh0016
Super User
Super User

Metric =
IF (
'Parameter'[Parameter Value] = "Dollars",
SUM ( 'Table'[Dollars] ),
FORMAT ( SUM ( 'Table'[Percent] ), "Percent" )
)

 

Hello @Anonymous ,
try this one....

 

thank you!
Mahesh Patel

Anonymous
Not applicable

Hi @Mahesh0016 , this doesn't seem to work. I only get a total percentage for all data points, it doesn't work on the line chart anymore.

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.

Top Solution Authors