Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am new to Qlik sense, and need some help. I have a "MonthYear" field which has months and years data and need to create a set expression that will only sum the data for the current year. Any help is much appreciate. thank you!
Hello Monica
You can use something like this:
sum ( if ( year (MONTHYEAR_FIELD) = year ( today ( ) ) , SUM_WANTSUM ) )
Hope it helps.
Regards
Diego
Hi Monica,
In my opinion the best would be to create together with the field MonthYear and field Year, when you create Master Calendar. Further field Year can be used as dimension in charts and in filters. It's easier than every time creating Set Analisys expression in charts the based on MonthYear dimension.
Regards,
Andrey
Create a Date, YearStart from MonthYear Field.
In Set Analysis you can use
Date = {">=$(=date(max(YearStart)))<=$(=date(max(Date)))"}
Diego,
This worked, thank you for your help!