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: 
Anonymous
Not applicable

Exprssion in straight table if date is less than?.....

Hi

Im trying to do a calculation if my calendar month end is less than or equals too a specific date, but im struggling to get it to calculate

this is my 10th attempt at something and still returning blanks

=Sum({$<CalendarMonthEnd={"<=$(=31/01/2017)"}>}),
if(NominalNominalCode='5001' or NominalNominalCode='5004' or NominalNominalCode='5031' or NominalNominalCode='5041' or NominalNominalCode='5051' or NominalNominalCode='5061' or NominalNominalCode='5071' or NominalNominalCode='6021' or NominalNominalCode='6001',NominalNetValue)
)
*
(0.15)
/
(12)
*-1,0
)

So if the month end is less than or equal to 31/01/2017 I want it to take the sum of the specified nominal codes and multiply it by 15% then divide it by 12

I can get it to do this without asking it to do the logic of the if function, but as soon as I put the if function in it returns blank, how is this done?

Help is greatly appreciated

Dan

1 Solution

Accepted Solutions
sunny_talwar

May be try this

=Sum({$<CalendarMonthEnd = {"<=$(=31/01/2017)"}, NominalNominalCode = {'5001','5004','5031','5041','5051','5061','5071','6021','6001'}>} NominalNetValue) * (-0.15/12)

View solution in original post

2 Replies
sunny_talwar

May be try this

=Sum({$<CalendarMonthEnd = {"<=$(=31/01/2017)"}, NominalNominalCode = {'5001','5004','5031','5041','5051','5061','5071','6021','6001'}>} NominalNetValue) * (-0.15/12)

Anonymous
Not applicable
Author

Perfect Thank you