Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I have data per month-end (stock-values per article)
If I set a filter on the month-end (say 6 months) the following happens:
In both cases, the active filter, shown in the headline of Qliksense shows correctly (6 of 51 filtered periods)
Am I doing something wrong or should I use a different formula ?
Based on the result of GetSelectedCount(Period), other figures such as average-consumption, days-of-inventory, etc. are calculated.
Regards,
Reinhold
Then why were you looking for GetSelectedCount in the first place? I am confused, but may be you just need Count(Distinct Month)?
Well, because this isn't working in a table per row, as shown in the attachement.
I need the no. of selected months, to calculate the average consumption in the selected period, not in the periods with data.
Sample:
Article has consumption of 100 in a single month (e.g. 2017-03).
Selected Periods: 2017 01-03 (3 months).
Correct Average Consumption per month: 100 / 3 = 33
Calculated Average Consumption per month as per the discussed formulas: 100 / 1 = 100.
Problems:
1) Wrong calculation
2) Filters in table not working anymore (don't understand that).
Solution now:
I created a variable with your formula Count(DISTINCT {1<Period = $::Period>} Period)
and use this now in the table.
Works fine now.
Anyway, thanks for your patience and your help !
Reinhold
Got it, in that case, you can also use this
Count(TOTAL DISTINCT {1<Period = $::Period>} Period)