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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis : sum total with criteria

Dear all,

I have a table with the following informations :

- SITE NAME

- WORKSHOP

- TYPE OF PRODUCT

- VOLUME

The target shoud be to have on dimension : site name, workshop and type of product and to calculate :

- the volume => ok it's easy : SUM(Volume)

- the ratio : volume of final product of the site (i.e : TYPE OF PRODUCT=FINAL PRODUCT, in my example : 56 130) / volume

=> I have used this formula to calculate the total volume of final product by site :

sum(total<[SITE NAME]>{<[TYPE OF PRODUCT]={'FINAL PRODUCT'},WORKSHOP=>}  [VOLUME])

and... it works !

Screen 1.PNG

but... if I do a filter on the WORKSHOP dimension, workshops with final product are always displayed

for example : with a filter on the workshop called 'MINE' only :

Screen 2.PNG

How can I change this formula to display only workshop that I've selected ?

Thank you very much for your help !

Regards,

5 Replies
Not applicable
Author

Any ideas ?

Anil_Babu_Samineni

I don't think so whether you require any changes over expressions. It filters default to selected one only. Would you able to provide sample

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
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Not sure but you can try this.

sum(total<[SITE NAME],WORKSHOP>{<[TYPE OF PRODUCT]={'FINAL PRODUCT'}>}  [VOLUME])


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Sergey_Shuklin
Specialist
Specialist

Hello, Julien!

The First exp is sum(val)

The Second exp is sum(total {<[TYPE OF PRODUCT]={'FINAL PRODUCT'}>}  [VOLUME])

The Third exp is column(2)/column(1).

Worked on my example. If it won't - please, share a sample of your data.

thomaslg_wq
Creator III
Creator III

Hi Julien,

Hehe tricky,

Try this :

if(WORKSHOP=WORKSHOP,sum(total<[SITE NAME]>{<[TYPE OF PRODUCT]={'FINAL PRODUCT'},WORKSHOP>}  [VOLUME]))