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

Set Analysis - Greater than Year

I've seen this question asked and answered, but I can't seem to get it to work for me.

I'm trying to limit a bar chart based on year. If I do this in the measure, things work fine - I only see 2016 data:

Count({<[InitDate.autoCalendar.Year] = {'2016'}>}ID)

2016.png

But if I try to show only data greater than a certain year, all data shows up:

Count({<[InitDate.autoCalendar.Year] = {'>=2016'}>}ID)

all.png

Is there something wrong with my syntax? Or something else going on?

Thanks,

Mike

12 Replies
Anonymous
Not applicable
Author

Thanks Aehman, but

Count({<[InitDate.autoCalendar.Year] = {">=$(2016)"}>}ID)


gives me an empty chart. So does using the variable.

MK9885
Master II
Master II

Use the attached Master Calendar script to extract the dates instead of using Auto Generated Master.

And to link it with fact use DateID as Key

In fact use

trim(date(YOURDATEFIELDHERE,'YYYYMMDD'))  as [DateID],


Also check your Date format, is it MM/DD/YYYY or DD/MM/YYYY something like that.

And then use the set expression examples provided. If it still doesn't work, can you upload the sample data?

Thanks.

vinieme12
Champion III
Champion III

The below thread shows how to attach a file to post

Uploading a Sample

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.