Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
lost_rabbit
Contributor III
Contributor III

Outer Set expression with "Total" function

I am trying to use the Outer Set Expression with Total function and it doesn't give me the expected results (i.e. same result as Inner ).

Measure 1 using Inner  :  sum( {<ExpYrWk = {'202306'}>} Total Vol)

Measure 2 using Outer  : {<ExpYrWk = {'202306'}>} sum(Total Vol)

lost_rabbit_0-1678135129566.png

I expected both to give the same result. I am trying to use outer set expression to make my formulas look more easy to read and write.
For eg, When I am doing % calculations using Total function with multiple conditions, it becomes a hassle when I have to use multiple conditions like below 

sum( {<ExpYrWk = {'202306'},Carrier={'APL'}, ShippingTypeCd = {'E E'}>} Vol)
/
sum( {<ExpYrWk = {'202306'}, Carrier={'APL'}, ShippingTypeCd = {'E E'}>} total Vol)

Would be easier If I could write something like this instead :

{<ExpYrWk = {'202306'},Carrier={'APL'}, ShippingTypeCd = {'E E'}>} sum( Vol) / sum( total Vol)

Thanks in advance 

Labels (1)
0 Replies