Forum Discussion
change number to abs value using a filter condition
Measure 2 = if(sum('Table'[ActualChrdHour])<0,(ABS(CALCULATE(SUM('Table'[ActualChrdHour]),'Table'[ReverseVsMercurry]="Not a reverse"))),sum('Table'[ActualChrdHour]))
I dont know why you are using two IF condition in your measure.
that is because your measure above is meets only 1 condition & doesn't meet the 2nd condition for instance
i need to convert my actual charged hour to negative, if 'Table'[ReverseVsMercurry]="Reverse Charge")
if(sum('Table'[ActualChrdHour])>0,(ABS(CALCULATE(SUM('Table'[ActualChrdHour])*-1,'Table'[ReverseVsMercurry]="Reverse Charge"))),sum('Table'[ActualChrdHour]))
how do you combine this 2 measures to 1?
hope it clarifies
Hi vjnvinod ,
Create 2 measures one for Reverse and another for Not a Reverse.
1. Reverse Charge=if(sum('Table'[ActualChrdHour])>0,(ABS(CALCULATE(SUM('Table'[ActualChrdHour])*-1,'Table'[ReverseVsMercurry]="Reverse Charge"))),sum('Table'[ActualChrdHour]))
2. Not a Reverse = if(sum('Table'[ActualChrdHour])<0,(ABS(CALCULATE(SUM('Table'[ActualChrdHour]),'Table'[ReverseVsMercurry]="Not a reverse"))),sum('Table'[ActualChrdHour]))
Then use them into Switch statement like below by using third custom column:
Final Output Column=SWITCH('Table'[ReverseVsMercurry],"Not a reverse",[Not a Reverse],"Reverse Charge",[Reverse Charge])
Please Give KUDOS to this effort and accept this as a solution if it helps you!