Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

KPI Window: return sum of this month value

Hello,

its often ask but somehow still not working:

Sum({<[Date.Dispatch.autocalendar.Date]={"$(=month(today))"}>}[Dispatch.Value])

I want to display the dispatch value of the current month. Simply straightforward but still didn't work out so far. 

Is it maybe because I cannot equal the autocalendar.Date to the month(today) DSE-functions?

Big thanks in advance. 

Best. 

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

Yes. make sure the format in set expression is same as the format in column

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

you should not use [Date.Dispatch.autocalendar.Date] field. you should use month field in your auto calendar.

but do you want current month year? above will give you sum of dispact values for all octobers (regardless of year) 

if so you need a field called month year in your auto calendar and date(monthstart(today()), 'MMM-YYYY').

i would recommend you move away from auto calendar and use a master calendar you create using script. it will give you more flexibility

https://qlikviewcookbook.com/2015/05/better-calendar-scripts/

 

Applicable88
Creator III
Creator III
Author

Hello @dplr-rn ,

thanks for the link you providing. I will look into the mastercalendar.

But back to what I have now just for a understanding: 

would Date.Dispatch.autocalendar.YearMonth or 

Date.Dispatch.autocalendar.Month and equal it with your mentioned function" date(monthstart(today()), 'MMM-YYYY')" in a set expression/set analysis like before?

Best. 

dplr-rn
Partner - Master III
Partner - Master III

Yes. make sure the format in set expression is same as the format in column