Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to create a variable for the below condition in Qlikview. Could you please help.
If the day of the current date is < 10, then report starts on the 15th day of the current month, else the report starts on 1st day of the next month. (For example, if the report runs on 01NOV2017, the beginning start usage date = 15NOV2017. If the report runs on 15NOV2017, the beginning start usage date = 01DEC2017) . I have start usage date filed in my report.
I have to use the above condition in Npriting. so thinking to create a variable in Qlikview
May be this
vVar
Date(If(Day(Today()) < 10, MonthStart(Today()) + 14, MonthStart(Today(), 1)))
UPDATE: Fixed my expression based on the comment below
May be this
vVar
Date(If(Day(Today()) < 10, MonthStart(Today()) + 14, MonthStart(Today(), 1)))
UPDATE: Fixed my expression based on the comment below
Dear,
can you try like
=Date(If(Day(Today() )< 10, MonthStart(Today()) + 14, MonthStart(Today(), 1)))
you should check the data format of the start usage date filed and variable date format.
I updated my expression based on yours just so we don't have an incomplete and incorrect expression... but if this works, I would suggest the OP to mark your response as the correct one
Thanks a lot Sunny,
It works great.
Dear Sunny,
one more doubt here, As start usage date i have some condition for end usage date. I need to select all the dates between start and end usage date. Will the above condition does that .
End usage date condition will be the kind of start usage date.
As mentioned above i need to select the date values between start and end usage date.
For ex : if the start dte is 15/11/2017 and end date is 30/11/2017, the dates between these two dates should be selected.