Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
segorume
Contributor
Contributor

data comparing

Hi, I need to display data comparing similar periods against their previous period (Month, Quarter and Semester). The problem is that when user select the current period (unclosed period) we should compare it with the same number of days in the previous period. I applied this logic with Month an Quarter using MonthStart and QuarterStart functions, and it works:

InMonthToDate([Day], Today(), 0) * -1 AS [CurMTDFlag], //Current Month Flag

if ([Day]>=date(MonthStart(Today(), -1),'DD/MM/YYYY') and [Day]<=date(MonthStart(Today(), -1)+(Today()-MonthStart(Today(), 0)),'DD/MM/YYYY'),1,0) as [PrMTDFlag], //Prior Month Flag

InQuarterToDate([Day], Today(), 0) * -1 AS [CurQTDFlag], //Current Quarter Flag

if ([Day]>=date(QuarterStart(Today(), -1),'DD/MM/YYYY') and [Day]<=date(QuarterStart(Today(), -1)+(Today()-QuarterStart(Today(), 0)),'DD/MM/YYYY'),1,0) as [PrQTDFlag], // Prior Quarter Flag

if (InMonths(6,[Day], Today(),0), 1, 0) AS [CurHYTDFlag] //Current Semester Flag

Now, I have this problem:

- How can I apply the same logic for previous SEMESTER (Always considering Semester 1 as Jan-Jun and Semester 2 as Jul-Dec)?

Tired of saving a lot of good porn sites to bookmark? No need to do it anymore. Save just one porn site where we have collected all the best https://safepornsites.pro/

 

 

 

 

 

 

Labels (1)
0 Replies