Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all ,
Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change, "##.## % ") & " " & IF(_Change > 0 , "▲", "▼")
Im wondering if anyone can help why when the percentage reaches 0. it does not include zero at the start , it makes the visual look confusing , is there some wrong with my formatting measure ?
Card 2 % =
VAR __BASELINE_VALUE = [Daily Average all]
VAR __VALUE_TO_COMPARE = [Daily Average]
RETURN
IF(
NOT ISBLANK(__VALUE_TO_COMPARE),
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
)
this is my Measure used in the previous measure for some context , it has no formatting applied to them.
Solved! Go to Solution.
@JamesBurke In the Overview Card 2 try the below.
Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change, "Percent") & " " & IF(_Change > 0 , "▲", "▼")
@JamesBurke ,
That's the default behaviour of Format DAX function when provided exact format. Here's what you can do apart from the solution @BIstvan provided:
__Zero_Format_Test =
VAR _Change = 0.002002
Return
IF(
_Change < 1,
FORMAT(_Change, "0.## % "),
FORMAT(_Change, "##.## % ")
)
& " " & IF(_Change > 0 , "▲", "▼")
Output:
@JamesBurke See below a second solution which should work.
Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change*100, "0.00"&"%") & " " & IF(_Change > 0 , "▲", "▼")
@JamesBurke ,
That's the default behaviour of Format DAX function when provided exact format. Here's what you can do apart from the solution @BIstvan provided:
__Zero_Format_Test =
VAR _Change = 0.002002
Return
IF(
_Change < 1,
FORMAT(_Change, "0.## % "),
FORMAT(_Change, "##.## % ")
)
& " " & IF(_Change > 0 , "▲", "▼")
Output:
@JamesBurke In the Overview Card 2 try the below.
Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change, "Percent") & " " & IF(_Change > 0 , "▲", "▼")
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |