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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Two Measure Inside If function, One is Value and One is Percentage

Hi Pro's,

 

I have measure which contains two measure and display result based on If condition: - 

IF (
MAX ( DimDrawer[MainDrawerName] ) = "Gross Margin",
'Key Measures'[Gross Margin],
CALCULATE ( 'Key Measures'[BalanceSC] )
+ CALCULATE ( SUM ( 'FA Forcast'[Value] ), 'FA Forcast'[Version] = "C.Forecast" )
)
But in above measure I want to display the Gross Margin in Percentage. If I add Format function I am getting result but some balnk also showing in the report.
 
For reference:- 
If I not use Format Function in Gross Margin:- 

'Key Measures'[Gross Margin],"0.00%" the report shows as below:-

 

Help1.PNG

 

 

 

But if I use Format Function in Gross Margin:- 

Format('Key Measures'[Gross Margin],"0.00%") the report changes to below

 

Help2.PNG

 

 

 

 

 

 

 

 

 

 

 

Please can anyone help me to use Two measures, one is Value and One is percent inside another measure without affecting the result.

 

 

Thanks in Advance

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to use format function in formula.

IF (
MAX ( DimDrawer[MainDrawerName] ) = "Gross Margin",
FORMAT('Key Measures'[Gross Margin],"##%")
CALCULATE ( 'Key Measures'[BalanceSC] )
+ CALCULATE ( SUM ( 'FA Forcast'[Value] ), 'FA Forcast'[Version] = "C.Forecast" )
)

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks for reply.

 

I tried but not working. Same issue. Do you have any other option.

Hi @Anonymous ,

 

Unfortunately, I can't reproduce your issue. see if you can share the sample pbix file.

Please mask any sensitive data before uploading

 

Best Regards,

Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @amitchandak ,

 

Thanks for the reply.

 

But I am not looking for the slicer. I have row level data and I want between two measures one should display value other should display Percentage.

Please look into the measure I have shared earlier in the mail, it may give you some idea what I am trying to do.

 

Thanks

Amith D

Hello,

 

I'm having the exact same issue, please let me know if any solution was found.

 

Thanks,
Yoav

amitchandak
Super User
Super User

@Anonymous , seem like you trying to create a measure slicer. That that is the issue. You have returned a formatted number.

Dynamic formatting is now allowed yet

https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.