The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Can anybody recommend a solution to this:
I have monthly data values that will always be between 0% and 100% but never higher than 100%.
They are displayed in a visual with labels turned on. What I want to achieve for the data labels is, if the value is < 100% to display to 1 decimal point (e.g. 98.7%), but if the value = 100% to display with no decimal points )100%).
Is that possible? I presume by using a measure?
Solved! Go to Solution.
Hi @Fusilier2 ,
FormattedPercent =
VAR BaseValue = SUM('Table'[PercentValue])
RETURN
IF(
BaseValue = 1,
FORMAT(BaseValue, "0%"),
FORMAT(BaseValue, "0.0%")
)
Hope this helps!
Hi @Fusilier2 ,
FormattedPercent =
VAR BaseValue = SUM('Table'[PercentValue])
RETURN
IF(
BaseValue = 1,
FORMAT(BaseValue, "0%"),
FORMAT(BaseValue, "0.0%")
)
Hope this helps!
Excellent ... Good solution 👍
Thank you for your help!
User | Count |
---|---|
13 | |
8 | |
8 | |
7 | |
5 |
User | Count |
---|---|
21 | |
15 | |
15 | |
10 | |
7 |