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: 
joeybird
Creator III
Creator III

ignore selcetions qlik sense


Hi

I have the following N PERIOD MEASURE

rangeavg(above(Count( distinct{$<  Department -= {'Catering'}>}[OrderID] ),0,53))

I want to select a year from a filter pane, but I want this measure to ignore it

I have done the following below and it does not work

rangeavg(above(Count( distinct{$<  Department -= {'Catering'}, Year =>}[OrderID] ),0,53))

I have heard of using concat, but how do I get that to work (if correct method to use) with this above measure

please help

10 Replies
sunny_talwar

This doesn't ignore selection in Year? Is your Year field called Year or something else?

RangeAvg(Above(Count(DISTINCT{$<Department -= {'Catering'}, Year =>} [OrderID]), 0, 53))

joeybird
Creator III
Creator III
Author

Hi

it does not seem to , as the rolling average number slightly changes when you select a year..

I want a user to select a year of their choice and the rolling average figures are un affected (not changed)..

this process normally works using the Year = for other set analysis measures..but does not seem to work for using the n period calculation using RangeAvg(above (Count

please help


sunny_talwar

I am not sure if you can share a sample or not, but it might help to look at it to figure out what might be wrong here

joeybird
Creator III
Creator III
Author

Hi

I cant sorry

but I have the dimension Weekend(OrderDate)

Measure 1 count(OrderID)

measure 2 rangeavg(above(Count( distinct{$<  Department -= {'Catering'}, Year =>}[OrderID] ),0,53))

When the user selects Year, the first measure should change..but the second measure should remain unaffected

as using the Year=  in the set analysis

the number for example before you select is

for example weekend date is

count 2216 (Measure 1)

Avg 2586 (Measure 2)

pick a year and I get

count 2216 (Measure 1)

Avg 2356 (Measure 2)

I think it does not work well with rangeavg functions

please help

sunny_talwar

Don't know my friend... sorry

joeybird
Creator III
Creator III
Author

Hi

is there another way / code type in qlik sense to ignore selections?

I fount concat..but I don't think I am doing it right

Kind Regards

sunny_talwar

This is the only way it was introduced to me... I am unaware of another way... but may be someone else can help you

joeybird
Creator III
Creator III
Author

Hi

in a post you replied to

3-months Average

so I am now using the code you provided...

RangeAvg(Below(Count( Distinct  {1< Year=>} [OrderID]), 0, 52))

I still need  when a user selects a year from the filer pane , the measure is unaffected

however using the Year= still does not work

I have had to change the above code to Above instead of below..as the number will be slightly out otherwise too

so it looks like

RangeAvg(Above(Count( Distinct  {1< Year=>} [OrderID]), 0, 52))

any more ideas please

Kind Regards

sunny_talwar

Nope still no idea... I am really sorry Joanna.. I am not sure what you have at your end... and without knowing, it will be very difficult to say anything