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.
Hi,
I am trying to add a "+" and/or "-" symbol infront of highlighted metric. The "-" symbol adds automatically it seems however the "+" does not. I have tried using below DAX which works in adding the "+" sign fine but not adding the text "vs last year YTD" section. Any ideas what i need to change to make it work? The final result i need is: +30% vs last year YTD.
PY_YoY_Diff_Intl =
FORMAT (
CALCULATE (
[AY_2021 vs AY_2022 YTD (%)],
CountryMapping[Region_L1] = "International",
'Calendar'[FutureDate] = "Past"
), "+0.0%;-0.0%" & " vs last year YTD")
Solved! Go to Solution.
Hi @adam_macs ,
I recommend that you have that logic on a measure on its own. E.g.
PY_YoY_Diff_Intl =
FORMAT (
CALCULATE (
[AY_2021 vs AY_2022 YTD (%)],
CountryMapping[Region_L1] = "International",
'Calendar'[FutureDate] = "Past"
)
Then place this measure in the format measure:
Proud to be a Super User!
Hi,
You can use IF and FORMAT to achieve this:
Proud to be a Super User!
thanks @ValtteriN , it kind of works, however i dont seem to be able to add the filtering on CountryMapping and FutureDate. Any ideas for a way around this?
Hi @adam_macs ,
I recommend that you have that logic on a measure on its own. E.g.
PY_YoY_Diff_Intl =
FORMAT (
CALCULATE (
[AY_2021 vs AY_2022 YTD (%)],
CountryMapping[Region_L1] = "International",
'Calendar'[FutureDate] = "Past"
)
Then place this measure in the format measure:
Proud to be a Super User!
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |