Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
CC_Abbott
Contributor
Contributor

Aggr and If expression

Hello,

 

I'm trying to filter a dimension using another input from a selection made by the user in Qlik Sense.

I need to filter for MonthYear higher or equal to the Control StartMth.  However, my expression does not return all values.  

 

=aggr(if([MonthYear]>=(Min([Control StartMth])),[MonthYear]),[MonthYear])

 

I'm just getting introduced into Set analysis and I'm unsure if my syntax is correct.  Any help would be appreciated. Thanks

CC

2 Replies
JustinDallas
Specialist III
Specialist III

Do you have any dummy data or pictures we can look at? 

 

What pops out at me is  that your statement says

 

"If the [MonthYear] is greater than the minimum [Control StartMnth], then return the [MonthYear].  Collect these results and group by MonthYear"

 

That last part is kind of strange.

CC_Abbott
Contributor
Contributor
Author

Here's a screenshot. 

 

I'm assuming it has something to do with the Cnt of 0 but I'M trying to filter the MonthYear dimension using the ControlStartMth field selected by the user.  Is there a better way to create a dynamic filter?

Month_Year.PNG

And here with selection Mar-2018 Control StartMth made

Month_Year_select.PNG