Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
jason_nicholas
Creator II
Creator II

Year to Date set analysis

I have searched a number of threads to determine the set analysis function for displaying year to date data. I don't fully understand how this function works, and I am not getting the expected results. I would appreciate feedback and corrections to my approach.

Here is the function I am using

Count(DISTINCT{$<[Event Flag]={'Event Flag'},Status={'Active'},[Test Filter]={'Remove Testing'},Year={$(=Max(Year))},Month={"<=$(=max(Month))"}>}[Booking ID])

I have region as a dimension, and the goal is to show a pie chart distribution of the number of [Booking ID]s that fit a specific description per region, to date (or potentially through the last completed month). When I add in the highlighted year to date function above, the chart totals are still measuring the entire year instead of year to date.

My date field is loaded by year, month, and day separately. In addition, all of the data in this report only includes the current year, so maybe I can remove the Year setting altogether?

Can someone explain in plain text how this function is supposed to work? How does it look at the current date (or date of last update)? It is my understanding that max(month) is looking for the maximum month listed in the data, but my data source looks ahead as well as behind, so the max(month) is always going to be December.

Is there a different function I could use to measure the number of bookings in my report that occur before a set date (today, the last reload date, or the end of the previous month)?

20 Replies
sunny_talwar

Super

I would ask you to close this thread by marking an appropriate response as correct instead of choosing 'Assumed Answer' as it will help future visitors when they land on this thread for answers.

Thanks,

Sunny