Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)
This is different then what you mentioned initially
Anyways, you can try this
Sum({<date = {"<=$(=MaxString(date))"}>} If(date = Aggr(NODISTINCT Max({<date = {"<=$(=MaxString(date))"}>}date), Month), sales))
Would you be able to share a sample to see what you have
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)
You have not selected a date yet... make a selection in date field and see if it works
Would you be able to share the qvf you are working with?
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,
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)