Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
@cbaqir what is CHECKBOOK_MONTH format?
mm/dd/yyyy
@cbaqir I don't think you need Aggr here as you are already having set on CHECKBOOK_MONTH try below
=num((sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}AvailHours)
-sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}est_np_build)
+sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}est_prod_build)
+sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}pte_design))
/sum({<CHECKBOOK_MONTH=,[CHECKBOOK_MONTH]={"$(=Date(MonthStart(Today())))"}>}AvailHours),'##.#0%')
I agree with @Kushal_Chawda you won't need aggr for this, but if you where to use aggr then I think you will need to use the set inside the aggr as well. Like this
Aggr({your set} sum({your set}.....
I'm not sure I understand your syntax here.
This is not returning any value.
I updated CHECKBOOK_MONTH to be m/d/yyyy.
When I pick the current month and I use the aggr expression in the fuel gauge, I see 94.4% (which is correct). 191/3435 hours.
However, I still have to select the current month when it should default.
If I use the NON-aggr expression and I pick the current month, I see 100% (which is not correct). I still have to select the current month when it should default.
I added the qvw to the first post @Kushal_Chawda @Vegar
@cbaqir see the attached