Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
AnkitMadhukar
Creator
Creator

Qlik Sense : Finding values in different periods

Hi Everyone,

I have a requirement where I need to show Area where transactions happened last month but not this month.
I am trying to find an approach to do this (preferably at chart level instead of changing load script , as the condition of period selection can change )

So Assuming we have this table 

MonthAmountArea
1-Jan-20100A
1-Jan-20200B
1-Jan-20100C
1-Feb-20150A
1-Feb-20100B


So if we see here , we don't have any transactions for area 'C' in Feb.
What can be the approach to get this result in Qlik? TIA!

Thanks
Ankit 

Labels (2)
1 Solution

Accepted Solutions
Taoufiq_Zarra

@AnkitMadhukar  in filtre like ?

=aggr(Only({<Area={"= sum({<Month={[$(=monthstart(today()))]}>}Amount)=0 and sum({<Month={[$(=monthstart(AddMonths(today(),-1)))]}>}Amount)>0"}>} Area), Area) 

 

output:

Taoufiq_Zarra_0-1612514355723.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

4 Replies
Taoufiq_Zarra

@AnkitMadhukar  I assume Year is 2021 not 2020

Maye be like this :

=Sum({<Area={"= sum({<Month={[$(=monthstart(today()))]}>}Amount)=0 and sum({<Month={[$(=monthstart(AddMonths(today(),-1)))]}>}Amount)>0"}>} Amount)

 

output:

Taoufiq_Zarra_0-1612429001832.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
AnkitMadhukar
Creator
Creator
Author

Hi @Taoufiq_Zarra ,
Thank you for helping me with this!
 Is there a way to have the dimension value only (So that it can be used in filter pane). 
Thanks


Taoufiq_Zarra

@AnkitMadhukar  in filtre like ?

=aggr(Only({<Area={"= sum({<Month={[$(=monthstart(today()))]}>}Amount)=0 and sum({<Month={[$(=monthstart(AddMonths(today(),-1)))]}>}Amount)>0"}>} Area), Area) 

 

output:

Taoufiq_Zarra_0-1612514355723.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
AnkitMadhukar
Creator
Creator
Author

Hi @Taoufiq_Zarra ,

Thank you so much!!