Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
danschofield1
New Contributor

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

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

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

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

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

danschofield1
New Contributor

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

Perfect Thank you