Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Use filter selection in expression (Qlik Sense)

Hi.

I'm new to Qlik Sense and I'm trying to use the values of the filter selection in an expression to calculate a measure

e.g. Filter on 8 of 12 Months (JAN - AUG) => calculation would be something like SUM[RecordedDays] / (COUNT[Months.Selected] * 15) =>100 / ( 8 * 15) [Note: Month.Selected should be the expression to use the value of the filter pane]

Any recommendations? Thanks.

Marco

1 Solution

Accepted Solutions
Employee
Employee

Re: Use filter selection in expression (Qlik Sense)

Assuming your field you are selecting on is called Months, try this:

Sum (RecordDays)/(Count (Distinct Months)*15)

-Josh

3 Replies
Employee
Employee

Re: Use filter selection in expression (Qlik Sense)

Assuming your field you are selecting on is called Months, try this:

Sum (RecordDays)/(Count (Distinct Months)*15)

-Josh

Not applicable

Re: Use filter selection in expression (Qlik Sense)

Hi Josh.

That did the trick. Thanks.

Marco

Not applicable

Re: Use filter selection in expression (Qlik Sense)

Thank you for your insight.

I Need some help to

Sum({$<AB_MB_Art = {"Miete"}>}Anz_Cont)

I have a field that has the Name  "Jahr" and the Values are 2012, 2013, 2014, 2015

If the filter is set to 2015 this works alone but I want to to it like that:

Sum({$<AB_MB_Art = {"Miete"}>}Anz_Cont) / Sum({$<AB_MB_Art = {"Miete"}, Jahr = {Year(Filter)-1}>}Anz_Cont)

to get a comparison between the years.

Thank you