Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
shivang_purwar
Contributor II
Contributor II

Need to show 6month rolling, and in those 6month we need to display month end value and for current month current date value.

Hi All, we have a requirement for monthly trend, in which we need to show 6month rolling, and in those 6month we need to display month end value and for current month current date value. if u guys know anything, kindly please help.

Dimension will be like monthYear field and in measure -> count(distinct {$<BILLING_FLAG ={1},[STATUS]={'Red'}, SNPSHT_TMS_DATE = {">=$(=Date(addmonths(monthstart(today()),-6),'DD-MM-YYYY'))<=$(=Date(addmonths(today(),0),'DD-MM-YYYY'))"}>} [AT_PROJECTID] )

or   count(distinct {$<BILLING_FLAG ={1},[STATUS]={'Red'}, SNPSHT_TMS_DATE = {"$(='>=' & Date(AddMonths(MonthStart(Max(SNPSHT_TMS_DATE)), -5), 'DD-MM-YYYY') & '<=' & Date(Max(SNPSHT_TMS_DATE), 'DD-MM-YYYY'))"}>} [AT_PROJECTID] )

From these 2 expression for a jan month, i m getting value for 1JAN2022 value , but 1 want value for 31jan2022 value for jan month.

Labels (1)
2 Replies
shivang_purwar
Contributor II
Contributor II
Author

Anyone, Kindly please help, this is bit urgent.

chris_djih
Creator III
Creator III

i have not a solution for your problem, but wnat to give some tips on which concepts you may use in such situations. My advice is to engage more closely with intellignet Master Calenders, where you safe information like _YTD or _Last6Months as a seperate flag field.
I don't know if it fits here but two other advanced calender concepts are canonical dates or the As-of calender.
Hope, this can be helpful for you.

In your last sentece you sai, you want 31st instead of 1st. Have you tried monthend() function?

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.