Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

set analysis ignore selection and aggr at different levels

2 questions: 

I have a fuel gauge that I want to always display the current month without the need to click on a month filter. However, I want to be able to filter by GOVERNING_GROUP and if one is selected, show the right calculation.

First, Why doesn't this expression ignore CHECKBOOK_MONTH selection?

=num((aggr(sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}AvailHours),CHECKBOOK_MONTH)
-(aggr(sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}est_np_build),CHECKBOOK_MONTH)
+aggr(sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}est_prod_build),CHECKBOOK_MONTH)
+aggr(sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}pte_design),CHECKBOOK_MONTH)))
/aggr(sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}AvailHours),CHECKBOOK_MONTH),'##.#0%')

Second, Since this is an AGGR statement, is there a way I can default to not having any GOVERNING_GROUP selected but allow the user to pick on and see the fuel gauge with that filter for the current month?

Labels (2)
11 Replies
cbaqir
Specialist II
Specialist II
Author

Brilliant! Thank you!

cbaqir
Specialist II
Specialist II
Author

If I wanted the same view but only for the NEXT month, wouldn't this be the code? It's not working:

 

=num((sum(aggr(sum({<CHECKBOOK_MONTH=,CHECKBOOK_MONTH={">=$(= Date(AddMonths(monthstart(today()),0)))>=$(=monthstart(today()),1)"}>}AvailHours),CHECKBOOK_MONTH))
-(sum(aggr(sum({<CHECKBOOK_MONTH=,CHECKBOOK_MONTH={">=$(= Date(AddMonths(monthstart(today()),0)))>=$(=monthstart(today()),1)"}>}est_np_build),CHECKBOOK_MONTH))
+sum(aggr(sum({<CHECKBOOK_MONTH=,CHECKBOOK_MONTH={">=$(= Date(AddMonths(monthstart(today()),0)))>=$(=monthstart(today()),1)"}>}est_prod_build),CHECKBOOK_MONTH))
+sum(aggr(sum({<CHECKBOOK_MONTH=,CHECKBOOK_MONTH={">=$(= Date(AddMonths(monthstart(today()),0)))>=$(=monthstart(today()),1)"}>}pte_design),CHECKBOOK_MONTH))))
/sum(aggr(sum({<CHECKBOOK_MONTH=,CHECKBOOK_MONTH={">=$(= Date(AddMonths(monthstart(today()),0)))>=$(=monthstart(today()),1)"}>}AvailHours),CHECKBOOK_MONTH)),'##.#0%')