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: 
Sameer9585
Creator II
Creator II

Month End dates rolling data

Hi,

i want the rolling 12 months trend in such a way that only count of that particular monthend only to be displayed.

Eg: if date 3rd march is selected,then
31st jan and 28/29 th feb count only to be displayed

Thanks

 

3 Solutions

Accepted Solutions
sunny_talwar

Create a monthend flag in the script like this

If(date = Floor(MonthEnd(date)), 1, 0) as MonthEndFlag

and then you can just use this

Sum({<MonthEndFlag = {1}, date = {"<$(=date)"}>}sales)

 

View solution in original post

sunny_talwar

This is different then what you mentioned initially

image.png

Anyways, you can try this

Sum({<date = {"<=$(=MaxString(date))"}>} If(date = Aggr(NODISTINCT Max({<date = {"<=$(=MaxString(date))"}>}date), Month), sales))

View solution in original post

17 Replies
sunny_talwar

Would you be able to share a sample to see what you have

Sameer9585
Creator II
Creator II
Author

 
sunny_talwar

Create a monthend flag in the script like this

If(date = Floor(MonthEnd(date)), 1, 0) as MonthEndFlag

and then you can just use this

Sum({<MonthEndFlag = {1}, date = {"<$(=date)"}>}sales)

 

Sameer9585
Creator II
Creator II
Author

hi @sunny_talwar ,

it is showing like this

not working properly

clipboard_image_0.png

sunny_talwar

You have not selected a date yet... make a selection in date field and see if it works

Sameer9585
Creator II
Creator II
Author

I checked that too it didn't work
sunny_talwar

Would you be able to share the qvf you are working with?

Sameer9585
Creator II
Creator II
Author

Hi @sunny_talwar ,

Sorry on date selection the data is displaying but if noting is selected it should show the output and if date is selected then that date of that month count also to be displayed.

 

Thanks,

sunny_talwar

What do you want to see without any selection in date? Count based on max(date) available in the dashboard? Try this

Sum({<MonthEndFlag = {1}, date = {"<$(=MaxString(date))"}>}sales)