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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Kaushik2020
Creator III
Creator III

Data calculation while using Date Range

Hi Everyone, If this is a normal behavior with Qlik sense. 

i am using below expression to get Date range for current month and previous month. 

If I select a month with 30 days e.g-June and Month-1 as July where we have 31 days. below expression calculates month max as 30 only. may be it is due to the Max(Date) function. 

//current expression to calculate current month:

Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}

//current expression to calculate previous month:

Date={">=$(=Date(monthstart(addmonths(Max(Date),-1))))<=$(=Date(addmonths(Max(Date),-1)))"},

 

But i am looking for suggestion where for below condition:

IF Month = June,

{

Month_start = 01/June/2023 and Month_end = 30/June/2023

}

For Month-1 below start and end date should be passed as range.

Month_start = 01/May/2023 and Month_end = 31/May/2023

Labels (4)
0 Replies