Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
In Qlik Cloud, I want to create budget measures that remain fixed for the entire year. For example, if the budget for Nature1 (in the field Nature) is 10,000, I want this value to stay the same no matter which quarter or month I select.
This is what I've done
Sum(
Aggr(
Sum({<
Year = {"$(=If(GetSelectedCount(Year)=0 or IsNull(GetFieldSelections(Year)) or GetFieldSelections(Year)='', Year(Today()), Max(Year)))"},
Month=,
Quarter=,
Date=
>} Budget),
Year, Zone, Nature
)
)
The problem is that I have to list manually all the fields (Year, Zone, Nature, etc.) in the Aggr() function and also it don't give me the correct resutl.
Is there a way to fix the budget values for the whole year without having to list all the fields manually in the Aggr or set analysis? Or is there a better approach to achieve this?
Thanks in advance for your help!
What are you looking to archieve? to create a table or something like that?
Hi @HS_1 ,
Well, to "fixate" the annual budget in a layout object, you'll have to do something of this kind, and the specifics really depend on the composition of your sheet objects - tables, charts, etc... You may or may not need the AGGR() function. You may not need to use field selections for this purpose. You might be able to use the TOTAL qualifier in certain situations, but not always.
Hence a valid question by @JHuis - what are you trying to accomplish? More specifically, in what sheet objects are you trying to show the annual budget, and what are the corresponding Dimensions in these charts? That will determine the best solution for the problem.
Cheers,
Oleg Troyansky
=Sum({1< Year = {"$(=If(GetSelectedCount(Year)=0 or IsNull(GetFieldSelections(Year)) or GetFieldSelections(Year)='', Year(Today()), Max(Year)))"}, Month=, Quarter=, Date=, Zone, Nature >} Budget)
but need clarification on where you are using these expression like in table or kpi?