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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement help please.

 

Sum (if(ActualAccount<>0,
           if([Miscellenious Fee]<>0,
            if(year=, Month=, Date=('>=$(=MonthStart(Max(Date), -1))<=$(=MonthEnd(Max(Date), -1))')),FeeAmount)))
Am I doing anaything wrong here ?

I want to calculate the sum of FeeAmount if ActualAccount <>0 and if [Miscellenious Fee]<>0  for previous month.

I tried below set analysis expression for previous month calculation and it works fine.

{<Year =, Month=, Date={'>=$(=MonthStart(Max(Date), -1))<=$(=MonthEnd(Max(Date), -1))'}>}

I want to put this in if statement instead of set analysis.Please help me.

Thanks a lot.

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Try:

Sum ({<Year =, Month=, Date={'>=$(=MonthStart(Max(Date), -1))<=$(=MonthEnd(Max(Date), -1))'}>}if(ActualAccount<>0 and [Miscellenious Fee]<>0,
            FeeAmount))

Hope this helps!

View solution in original post

2 Replies
jerem1234
Specialist II
Specialist II

Try:

Sum ({<Year =, Month=, Date={'>=$(=MonthStart(Max(Date), -1))<=$(=MonthEnd(Max(Date), -1))'}>}if(ActualAccount<>0 and [Miscellenious Fee]<>0,
            FeeAmount))

Hope this helps!

Not applicable
Author

Jerem,Awesome.Thank you.