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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Atchaya-Prabhu
New Member

Dax

  I have A column and has a list of value 
Also B column with list of value . i want to see the difference of A  and B column

For example:

 A as 18.89% AND B as 12.48% i want to see the value output as +6% but when i try it shows as 
+60%
This is my DAX:
Difference(%) = VAR DifferenceValue = DIVIDE([A] - [B], [B]) RETURN IF(DifferenceValue >= 0, "+" & FORMAT(DifferenceValue * 100, "0"), FORMAT(DifferenceValue * 100, "0") ) & "%"

Can i know how to see the value as+6%? anyone please


@amitchandak 

2 REPLIES 2
nvprasad
Solution Sage
Solution Sage

Hi Prabhu,

Please check the below DAX measure to get expected result.

 

Different % =
Var check1 = ('Table'[a]-'Table'[b])
Var Positiveresult =  "+ "&CONVERT(check1 *100,STRING) &"%"
Var Negativeresult = "- "&CONVERT(check1 *100,STRING) &"%"
Var Finalresult = IF(check1>0,Positiveresult,Negativeresult)
Return Finalresult
 

nvprasad_0-1685998281365.png

 

Appreciate a Kudos! ‌‌
If this helps and resolves the issue, please mark it as a Solution! ‌‌

Regards,
N V Durga Prasad

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.
rsbin
Community Champion
Community Champion

@Atchaya-Prabhu ,

Just change your VAR to [A] - [B]

Difference(%) = 
VAR DifferenceValue = [A] - [B]
RETURN IF(DifferenceValue >= 0, "+" & FORMAT(DifferenceValue * 100, "0"), FORMAT(DifferenceValue * 100, "0") ) & "%"

rsbin_0-1685998291449.png

Hope this is what you were looking for.

Regards,

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.