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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
hueuro
Frequent Visitor

DAX FORMULA

HOW CAN I MAKE DAX FORMULA FOR MOM% IF THE CM IS HIGHER VALUE SHOULD BE POSITIVE.but mom i put abs with PM but still some exp getting positive (eg selling exp) when i remove abs mom2 see the total comming -ve.it should be positive

MOM = IFERROR( ([CM 2]-[PM])/ABS([PM]),"")
MOM2 = IFERROR( ([CM 2]-[PM])/([PM]),"")
Please help how can i get currect varience%

 

hueuro_0-1712239598851.png

 

2 REPLIES 2
lbendlin
Super User
Super User

That is a surprisingly complex and very subjective topic.

 

What is the variance from -10 to +20 %  what about from -10 to 0?  What about from 0 to 20 ?

 

You need to go through all scenarios and decide for yourself which interpretation makes sense for you.  Using ABS is one common approach, but it does not cover all scenarios.

StrategicSavvy
Resolver II
Resolver II

Hi @hueuro 

@try using Dax SIGN function for handling positive negative values. Also instead of IFERROR use you can switch to DIVIDE function cause it's designed to handle 0-division / NaN / infinity errors. 

hope it helps ! 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors