Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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