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

Fabs total issue

Hi Experts - in the attached qv file.. I have created an expression which says Column B value Column A values... By the use of "Fabs" function i got all the expression values in positive.. But now i need the Total of all the values which came from my fab function..

I.e., in the attached example .. Total of my Expression should be 200 where as it shows only 40.. Please Help!

29 Replies
Anil_Babu_Samineni

Try this one? Or else please share sample

Sum({<Month>} Aggr(Fabs(sum({<Month>}B)-Sum({<Month>}A)), A, B))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III
Author

Hi Anil - I have added month to the above data... Now i see the total as 80..instead of 240.. Can u plz chk this?

fabs.PNG

Anil_Babu_Samineni

Do you mean this one is wrong?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
mostwanted123
Creator
Creator

Hi Bharani,

Try this,

Sum(fabs(B-A))

Hope this helps you!

Regards,

Pratik

bharani8
Creator III
Creator III
Author

Actually.. if u take Jan month and Deduct on the line item level... We see total as 60 instead of 20.. That is the issue i face now..

Anil_Babu_Samineni

From above screen shot, Can you make it clear how you are Deduct the Jan month?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III
Author

For Jan we have 3 line items.. refer to my excel screen shot in above reply... each line item.. ABS Subtract is 20 each... so it should be 60..

Anil_Babu_Samineni

Like this?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

try below expression, should work

sum(aggr(fabs(sum(B)-Sum(A)),Month,A,B))

parkarakshada
Partner - Contributor II
Partner - Contributor II

Hi Bharani

Please try this

Sum(Fabs(B-A))Capture.PNG