Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
I have a stacked column chart that has a measure as a value. That measure is formatted as a whole number with 0 decimal places. When displayed in a visualization, it displays as a decimal value and if you hover over it, it only shows the whole number.
I would like to chart the whole number and not the underlying decimal value. Any suggestions?
Thanks, Mark.
Solved! Go to Solution.
Hi @markbell,
I can reproduce your issue when I format a measure to Whole number under Modeling ribbon. In your scenario, you can use ROUND function to format your measure, then the visual shown up based on the formatted value. There is an example for your reference.
Your formula should be like: FTE = ROUND(if(isblank([#WSC*Hours]/208),0,[#WSC*Hours]/208),0).
Thanks,
Lydia Zhang
Hi Mark,
If you got to the formatting options (see my image below) and set the Display Units to none it show exactly what your table values are.
Alternatively set the Decimal Places option to 0.
Hope this helps.
Spot On. This is the real solution you had shared. Thanks it worked exactly as per the requirement.
For the folks who dont have DATA LABELS visible version, select Field Formatting and then select the column from the drop down... good luck
Hi maracles,
Thanks for the response. Unfortunately I don't have Data Labels turned on but when I do, it does display the whole number however you can clearly see that it is plotting a different number (eg look August 15 - My Company says 1 but it clearly doesn't reach the 1 grid line).
My FTE measure is set to Whole Number with 0 decimal places.
Hmm, I misunderstood your original post. So if you kept data labels on and then set them to 2 decimal places would August 15 label still say 1.00?
I've had a similar issue in the past and it was because the underlying data in the data table was set to 2 decimal places and for some reason Power BI wasn't registerting it as whole numbers when setting the measure to be a whole number (as you have done). My solution in that case was setting the column in the data table to be a whole number but I can clearly see why that's impractical or unworkable in a lot of scenarios.
If I set it to 2 decimal places, it shows 0.76 but if I hover over it, it shows 1.
Given the nature of my data, I would prefer to leave the data table as it is.
Thanks for your help.
Hi @markbell,
I can reproduce your issue when I format a measure to Whole number under Modeling ribbon. In your scenario, you can use ROUND function to format your measure, then the visual shown up based on the formatted value. There is an example for your reference.
Your formula should be like: FTE = ROUND(if(isblank([#WSC*Hours]/208),0,[#WSC*Hours]/208),0).
Thanks,
Lydia Zhang
Hi Lydia,
Many thanks. That works well.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.