Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mikkelba
Contributor
Contributor

Set Expression - Exclude all calendar fields but allow all others fields

Hello,

What is the syntax to exclude all fields of a specific kind (e.g. calendar fields) from a set expression but allow other selections in all other fields (e.g. product type or some ID)?

An example of a measure that sums the last 10 days of "A" in Table.Field:

Sum({$< [Table.Date.Calendar.YearMonth], [Table.Date.Calendar.Date] = {"$(= '>' & Date(vToday-11))"}, [Table.Field] = {'A'}>} [Table.Count])

 

My problem is that I have several calendar functions with the syntax [Table.Date.Calendar.XXX] such as Year, Month, YearMonth, YearQuarter, Quarter, YearWeek etc. In the above example I am only ignoring the YearMonth function and I could do the same with all the calendar fields, but I am hoping for a better solution as I have quite many calendar functions. Is there any way to exclude all selection with the prefix [Table.Date.Calendar.*] but allow all others?

The calendar function is called through a sub-routine so the calendar I am using is not the standard from Qlik.

 

Thanks in advance!

Labels (2)
1 Reply