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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
F_Reh
Helper IV
Helper IV

Displaying different Decimal points in Graph (whose X-axis units vary on Slicer selected) ?

Good Afternoon,

 

I have a slicer with 4 options, two of which need to be displayed as whole numbers (with no decimal places) and the other two as percentage (with two decimal places):

 

F_Reh_0-1751903594936.png

 

 

Is this possible ? I tried to look at :

 

1) Y-axis properties of the above bar chart.

2) The four measures linked to the 4 options.

 

But it seems that the decimal places is fixed for the figures for all 4 options (although the graph does show whole numbers for the two options, and percentage for the other two options it does not seem to allow you to vary the decimal places between these different data types)..

 

Kindlly advice.

 

2 REPLIES 2
danextian
Super User
Super User

Hi @F_Reh 

I am assuming you're not using Field Parameters for measures. Using so would have respected the individual formatting of each measure being referenced. If you're using a conditional measure with a disconnected table, you will need to use dynamic format strings. Example:

IF (
    SELECTEDVALUE ( 'units table'[units] ) IN { "who number 1", "whole number 2" },
    "#,#",
    "0.00%"
)

 Please refer to these:

Create dynamic format strings for measures 

Let report readers use field parameters to change visuals (preview) 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vojtechsima
Super User
Super User

@F_Reh 
Hey, the issue is that if you leave at Auto, it behaves based on the range between Min and Max values. If Min would be 0 and Max would be 0.9, you would get decimal points for % and whole numbers for the other.

 

vojtechsima_0-1751905705407.png

But because you stylize it as %, therefore the gap is too great (as now it's not from 0 to 0.9, but 0-90 for example), it will automatically use whole numbers and %, even tho your labels can display decimal points.

 

So I am afraid you can't stylise it with the Auto option, if you keep one visual. The easiest solution would be probably to combine field parameters with bookmarks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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