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

Set analysis - exclude current year AND month

Hello,

I would like to exclude the current year AND month from my chart, but it doesn't work :

sum(

    {

        <field_month -= {"$(= month(ReloadTime()) )"}> * <field_year -= {"$(= year(ReloadTime()) )"}>

    }  

nb_seconds)

/ 60

Please help, best regards

11 Replies
neha_shirsath
Specialist
Specialist

Hello,

Try this,

Sum({<DateField= e({"$(=Monthname(max(DateField)))"})>}Field)

Regards,

Neha S.

Not applicable
Author

Hi everyone, I found how to resolve my problem,

First, I have added a new "special_period_field" to my LOAD which have this format : 'YYYYMM' (extracted from a the date field)

Then I have created a new variable :

vSpecialPeriod = year(ReloadTime()) & num( month(ReloadTime()), '00') // Returns YYYYMM value

=> The reason why I have created this variable is that QlikView don't know how to interpret this expression in the set analysis condition.

Finally I've used this condition in my set analysis :

sum( {< foo_field = {"foo_value"}, special_period_field -= {"$(=vSpecialPeriod)"} >}  numericField )

To conclude I would say that QlikView looks like a great tool but Set Analysis SUCKS !