Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Josh_Good
Employee
Employee

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

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

-Josh

View solution in original post

3 Replies
Josh_Good
Employee
Employee

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

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

-Josh

Not applicable
Author

Hi Josh.

That did the trick. Thanks.

Marco

Not applicable
Author

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