Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression: sum

HI All,

Im having difficulties on the expression syntax. I have 1 table for example:

TABLE_A

Fields are : AA, AB, AC, AD, AE

how do i get the total of AA ...when AA is ....when AB=Z and when AB=M

(sum of Z) - (sum of M)

this is how i did it..but there is syntax error. kindly help.

(sum (AB={Z}> } AA) - sum (AB={M}>} AA))

thank you

1 Solution

Accepted Solutions
Not applicable
Author

Did got your exact requriment, but try this

Sum({<AB={Z}>}AA) - Sum{<AB={M}>AA}

Regards,

Amay

View solution in original post

3 Replies
Not applicable
Author

the scenario is just the same like this:

(sum( {$<Year={$(=Max(Year))}, Month = {"<=$(=Max(Month))"}, Plant = {'0001', '0002', '0003', '0004'}, Type = {111}>} Qty)

-sum( {$<Year={
$(=Max(Year))}, Month = {"<=$(=Max(Month))"},  Plant = {'0001', '0002', '0003', '0004'}, Type = {112}>} Qty))

sujeetsingh
Master III
Master III

First explain what is this Z....M..???

Not applicable
Author

Did got your exact requriment, but try this

Sum({<AB={Z}>}AA) - Sum{<AB={M}>AA}

Regards,

Amay