Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

Calendar filter value ignored

Hi experts

I have a filter on dimension "YearMonth". This should be ignored in a formula, it should ignore the filter value.

What's wrong with the definition below? If there is a filter set on YearMonth the formula ignores it and shows nothing / zero.

 


sum({<[Timestamp.autoCalendar.YearMonth]=>}
aggr(

-Count(IF(IsActive=1 and LatestData=1 and Gender='M', Gender)),
[HashCode]
)
)

Labels (4)
1 Solution

Accepted Solutions
Or
MVP
MVP

Presumably, you'll want to include your set in the internal formulas as well? Or did you intentionally only use it in the external sum?

View solution in original post

3 Replies
Or
MVP
MVP

Presumably, you'll want to include your set in the internal formulas as well? Or did you intentionally only use it in the external sum?

TomBond77
Specialist
Specialist
Author

Yes, you are right. This works for the above formula.

But what about this formula? Here I have the same problem.

IF(
IsActive=1 and LatestData=1,

Avg(
{<[Timestamp.autoCalendar.YearMonth]=>}
Year(today())+Year2Date([Contractual Start Date])-Year([Contractual Start Date]))
)

Or
MVP
MVP

Possibly the same issue as the above - your external If() isn't impacted by the set? Typically you would want to place the if() inside the aggregation function, not outside.