Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
MeeraAgrawal
Creator
Creator

Qlik set analysis

Hi Guys 

The below expression throwing an error

if(dc_summary_dropdown[Graph2]="Number of Stores", Sum([dc_instance.NUMBER_OF_DESTINATIONS]),
If(dc_summary_dropdown[Graph2]="Outbound Volume (Pallets)", Sum([dc_instance.QUANTITY_SHIPPED]),
Sum([dc_instance.AVERAGE_OUTBOUND_DISTANCE])))

Please  help me.

2 Solutions

Accepted Solutions
Anil_Babu_Samineni

Here double quotes can prevent as field, If you mean the field name you must use single quote like

if(dc_summary_dropdown[Graph2]='Number of Stores', Sum([dc_instance.NUMBER_OF_DESTINATIONS]),
If(dc_summary_dropdown[Graph2]='Outbound Volume (Pallets)', Sum([dc_instance.QUANTITY_SHIPPED]),
Sum([dc_instance.AVERAGE_OUTBOUND_DISTANCE])))

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

View solution in original post

MeeraAgrawal
Creator
Creator
Author

Thanks your prompt response but I resolved it by write it like


if([Graph2]='Number of Stores', Sum([dc_instance.NUMBER_OF_DESTINATIONS]),If([Graph2]='Outbound Volume (Pallets)', Sum([dc_instance.QUANTITY_SHIPPED]),Sum([dc_instance.AVERAGE_OUTBOUND_DISTANCE])))

View solution in original post

5 Replies
MeeraAgrawal
Creator
Creator
Author

Nobody is here to give me an answer

Anil_Babu_Samineni

Here double quotes can prevent as field, If you mean the field name you must use single quote like

if(dc_summary_dropdown[Graph2]='Number of Stores', Sum([dc_instance.NUMBER_OF_DESTINATIONS]),
If(dc_summary_dropdown[Graph2]='Outbound Volume (Pallets)', Sum([dc_instance.QUANTITY_SHIPPED]),
Sum([dc_instance.AVERAGE_OUTBOUND_DISTANCE])))

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
MeeraAgrawal
Creator
Creator
Author

Thanks your prompt response but I resolved it by write it like


if([Graph2]='Number of Stores', Sum([dc_instance.NUMBER_OF_DESTINATIONS]),If([Graph2]='Outbound Volume (Pallets)', Sum([dc_instance.QUANTITY_SHIPPED]),Sum([dc_instance.AVERAGE_OUTBOUND_DISTANCE])))

Anil_Babu_Samineni

LOL, You changed field itself. Great !!

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
MeeraAgrawal
Creator
Creator
Author

Hi @Anil_Babu_Samineni 

I didn't changed field I removed table name associated with field name only.