Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Rolling 6 months in Qliksense

Hello,

I need to show rolling 6 months data in my pivot table and I have written below expression :-

=count({<test={'>=$(=MonthStart(addmonths(Max(test),-6)))<=$(=Max(test))'}>} ISSUE_NO)

But it is giving me blank data. I checked my monthstart and max date expression in KPI's and I am getting range of date .

Aspiring_Developer_0-1653579749321.png

 

Aspiring_Developer_2-1653579817811.png

 

Aspiring_Developer_1-1653579771289.png

I have data starting from 1/11/2021 till today (26/05/2022) .

I need to show rolling months for 6 months and I also need to show the weekly data for the above dates.

Not sure , what mistake I am making. Can anyone please help ?

Thanks in advance

@sunny_talwar 

Labels (1)
1 Solution

Accepted Solutions
saranyadurai
Contributor III
Contributor III

Hi @Aspiring_Developer,

Can you try this,

Count({<test={">=$(=Date(MonthStart(Max(test), -5),'MM/DD/YYYY'))<=$(=Date(Max(test),'MM/DD/YYYY'))"}>} ISSUE_NO)

Please ensure the date format same as test date.

Thanks,

 

View solution in original post

3 Replies
saranyadurai
Contributor III
Contributor III

Hi @Aspiring_Developer,

Can you try this,

Count({<test={">=$(=Date(MonthStart(Max(test), -5),'MM/DD/YYYY'))<=$(=Date(Max(test),'MM/DD/YYYY'))"}>} ISSUE_NO)

Please ensure the date format same as test date.

Thanks,

 

Aspiring_Developer
Creator III
Creator III
Author

How can I showcase data for weeks ? 

Date range 1/11/2021 till today's date

saranyadurai
Contributor III
Contributor III

Maybe try this,

WTD,

Count({<test={">=$(=Date(WeekStart(Max(test)),'MM/DD/YYYY'))<=$(=Date(Max(test),'MM/DD/YYYY'))"}>} ISSUE_NO)