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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
adam_macs
Helper I
Helper I

Adding a plus sign in front of percentage

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")

 

adam_macs_0-1643972309638.png

 

 

1 ACCEPTED 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:

Value1 = if([PY_YoY_Diff_Intl]<0,FORMAT([PY_YoY_Diff_Intl],"-#.#%"),
FORMAT([PY_YoY_Diff_Intl],"+#.#%"))




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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ValtteriN
Super User
Super User

Hi,

You can use IF and FORMAT to achieve this:

Value1 = if(1<0,FORMAT(1,"-#.#%"),
FORMAT(1,"+#.#%"))

ValtteriN_0-1643981801189.png

 


Just replace the 1 with your measure and you should be good to go.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/




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

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:

Value1 = if([PY_YoY_Diff_Intl]<0,FORMAT([PY_YoY_Diff_Intl],"-#.#%"),
FORMAT([PY_YoY_Diff_Intl],"+#.#%"))




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

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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