Forum Discussion
vjnvinod
Impactful Individual
6 years agochange number to abs value using a filter condition
Hi, Can you help me with a measure, basically i need to convert any negative numbers in my coloumn(ActualChrdHours) to positive number if my coloumn(ReverseVsMercurry) is "Not a reverse". ca...
Tahreem24
Super User
6 years agoHi vjnvinod ,
You can use the below Measure for your new requirement.
Measure 2 = if(sum('Table'[ActualChrdHour])<0,(ABS(CALCULATE(SUM('Table'[ActualChrdHour]),'Table'[ReverseVsMercurry]="Not a reverse"))),sum('Table'[ActualChrdHour]))
I expect Kudos to my previous answer 😊 and this answer as well. And Please Accept this as a solution.
vjnvinod
Impactful Individual
6 years ago- Tahreem246 years ago
Super User
vjnvinod ,
As per your very first message in this post you mentioned below statement:
"basically i need to convert any negative numbers in my coloumn(ActualChrdHours) to positive number if my coloumn(ReverseVsMercurry) is "Not a reverse".
Based on above requirement we requirement two fields i.e. ActualChrdHours and ReverseVsMercurry. So why you are using chargedHour field? And this ChargedHour is coming from table different than where these ActualChrdHours and ReverseVsMercury are coming. SO make the proper relationship between those two fields cause this is happening due to improper relationship.
Thanks!