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: 
vikasshana
Creator III
Creator III

selections in filter should not affect table

Hi,

I've below 6 filters in my app

Year

Month

Quarter

Period

Business

Country

And I've below set analysis expression in a table to calculate 12 month rolling using the Period field.

sum({<Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales).

So my requirement is if I make selection in Year, Month, Quarter, Period filters it should not effect the table. I tried below expression but it is not working.

sum({<Year=, Month=, Quarter=, Period=,Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales)

Could you please help me on that.

Regards,

V

1 Solution

Accepted Solutions
TheLazyDeveloper
Contributor III
Contributor III

I believe you would need to add the ignore field into the Max expressions as well or just apply outer set analysis so it filters down in the entire measure.

{<Year=, Month=, Quarter=, Period=>}

sum({<Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales)

 

View solution in original post

3 Replies
TheLazyDeveloper
Contributor III
Contributor III

I believe you would need to add the ignore field into the Max expressions as well or just apply outer set analysis so it filters down in the entire measure.

{<Year=, Month=, Quarter=, Period=>}

sum({<Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales)

 

vikasshana
Creator III
Creator III
Author

I tried with the expression which you recommended but it is still the same.

vikasshana
Creator III
Creator III
Author

This expression is working, if we ignore fields inside max expressions.

sum({<Year=,Month=,Quarter=,Period=,Period={">=$(=Date(AddMonths(Max({<Year=,Month=,Quarter=,Period=,Period=>}Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max({<Year=,Month=,Quarter=,Period=,Period=>}Period))"}>}Sales)