Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This formula gives a correct value
Sum({$<period = {$(chosen_period)}>}value)
This function does not :
Sum({$<period <= {$(chosen_period)}>}value)
(<= instead of < )
chosen_period is a value calculated by: max(period)
period is chosen from a listbox
Is it not possible to use the <= operator ?
Try
Sum({$<period = {"<= $(chosen_period)"}>}value)
In my chart i now get for every period lower or equal than chosen_period the value of that period.
I would like to get the selected period and the sum of values until that period
I'm guessing from your response that period is one of your chart dimensions. If that's the case, set analysis cannot be used to select periods - the set analysis condition is only performed once per chart, not once per line.
Can you explain your need in more details? It sounds like you should use the "Full Accumulation" option, but I'm not totally sure...
cheers,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
try
Sum({1<period = {"<= $(chosen_period)"}>}value)
The solution of NagaianK and Oleg give the right results in a simple setup, but not in the app I am building. Must have another reason. Unfortunately I cannot publish this app here.
When I use Sasidhar's formula I get the total result whithout concerning the chosen period.
may be you need to ignore other dimensions like date perhaps?
Sum({$<DATE=,period = {"<= $(chosen_period)"}>}value)
hth
Sasi
Found that when I changed period into num(period) in my load script I get the correct results using NagaianK's formula.
Thanks to all