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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rosu
Regular Visitor

Dynamically use different measure with different decimal places based on a slicer

Hi,

I am new to Power BI and need some help from the experts. I have two different measure fields that essentially represents same business metrics but with two different DP (Decimal Points). The first measure "% of value" has 8 decimal places and the second one "% of Value 2 dp" has only 2 decimal places. I am trying to dynamically use these columns in a measure "% Value" either the first one or the 2nd one based on a slicer selection. I am able to get it but the issue is Power BI strips the decimal places to 2 during measure calculation. Is there a way to have all 8 decimal places returned without using FORMAT as it converts my measures to string?

 

Thank you!

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @rosu ,

This is not possible if you want the measure to display values with two decimal places and eight decimal places at the same time in Numeric type according to the slicer option. You can refer to the following blog to make it text type with FORMAT function, but this is something you want to avoid...

Power BI - Dynamic Formatting by Slicer Selection

yingyinr_0-1652252741512.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @rosu ,

This is not possible if you want the measure to display values with two decimal places and eight decimal places at the same time in Numeric type according to the slicer option. You can refer to the following blog to make it text type with FORMAT function, but this is something you want to avoid...

Power BI - Dynamic Formatting by Slicer Selection

yingyinr_0-1652252741512.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rosu
Regular Visitor

Thank you Amit! Even with calculation group I see the measure is being stripped to 2 decimal place when I add it to the conditional calculation (based a separate selection slicer). 

amitchandak
Super User
Super User

@rosu , Best to use calculation group there you can do different formatting

 

https://blog.enterprisedna.co/conditional-formatting-in-calculation-groups-power-bi/

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.