Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Set Analysis Help

Hi All,

Need Below Logic in set analysis..

(if(Duty_Free_Flag = 'Y',(sum(Land_Cost +ActLand_Cost)*sum(Quantity)), if(Duty_Free_Flag = 'N',(sum((Land_Cost +[Stock Landed Cost])*(Quantity))))) + (sum(Quantity * Land_Cost)+sum(Tot_Duty))) - sum(Tot_Duty)

Kindly suggest

6 Replies
Anonymous
Not applicable

hi abhay,

may be try :

if(Duty_Free_Flag = 'Y',((sum(Land_Cost) + sum(ActLand_Cost))*sum(Quantity)) + ((sum(Quantity) * sum(Land_Cost)+ sum(Tot_Duty)) - sum(Tot_Duty)),

if(Duty_Free_Flag = 'N',((sum(Land_Cost) + sum([Stock Landed Cost]))* sum(Quantity)) + ((sum(Quantity) * sum(Land_Cost)+ sum(Tot_Duty)) - sum(Tot_Duty))))

jonathandienst
Partner - Champion III
Partner - Champion III

This is a logic branch. Set analysis is for  filtering, not for branching the expression. You have no filters in the expression.

Set analysis is not 42*.

*See Hitchhikers Guide to the Galaxy

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
abhaysingh
Specialist II
Specialist II
Author

Actually I need total Amount After this Expression, but when I am using it not getting Final Amount as total.

jonathandienst
Partner - Champion III
Partner - Champion III

I am not saying your expression is correct, I am saying that set analysis is not the answer.

Have you checked your parentheses?

Post your qvw or a representative sample with the value you expect from the expression for more detailed help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Kushal_Chawda

try pick & match instead of If

=(pick(match(Duty_Free_Flag,'Y','N'),

sum(Land_Cost +ActLand_Cost)*sum(Quantity),

sum((Land_Cost +[Stock Landed Cost])*(Quantity)))

+ (sum(Quantity * Land_Cost)+sum(Tot_Duty))) - sum(Tot_Duty)

abhaysingh
Specialist II
Specialist II
Author

Thanks For revert but I am not getting Total for the same, I don't want to select any field to get result..