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

*= intersection set analysis possible with autocalendar?

I'm attempting to update a graphic  to use the intersection property of set analysis based on the year in which the item occurred. For example, I'm currently using a simple formula of Count({$<Example_Date.autocalendar.Year = {'2017'},Example_Date) to return all exams that occurred in 2017 and similarly for 2018, 2019, 2020 & 2021. Our users requested that if they select a filter for 2017 that the other values should all display as 0.

I figured this could be done by using Count({$<Example_Date.autocalendar.Year *= {'2017'},Example_Date). However when I add the asterisk  to the formula as shown above, the value returned becomes 0 regardless of whether a filter is applied. I've successfully used this with non date related fields without issue in the same dashboard, so I'm not quite sure what's happening other than an inability to use the intersection analysis with the autocalendar. Is this a bug or am I just completely missing something obvious?

Labels (2)
2 Replies
Dalton_Ruer
Support
Support

Not sure if you actually copied and pasted your code or not, but the above code is missing the terminator for the fields in the set analysis.

Count({$<Example_Date.autocalendar.Year = {'2017'},Example_Date)

should be

Count({$<Example_Date.autocalendar.Year = {'2017'}>},Example_Date)

I would think that the Year would be Numeric and could be {2017} without the single quotes. Not sure if that might be throwing things off. Just taking random guesses. 

mattwestveer
Partner - Contributor
Partner - Contributor
Author

Thanks for the response. I missed the terminator in the post, but it is in my expression in Qlik Sense. Always good to double check appropriate syntax.

I did test using the numeric value of {2018} vs. using {'2018'}. They both return full values as expected with the equals '=' operator. However they also both return '0' when using the '*=' operator.