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: 
siddharthsoam
Partner - Creator II
Partner - Creator II

How to read multiple values from a filter pane

Hi

Please  tell me how can I fetch multiple values from a filter pane . I have a accounting period filter from which I want to calculate a certain measure of the previous selected period.

counting period.JPG

For example if I select counting period as 4,5 it should return me sum(revenue) for 4 and 3 month.

Thanks in advance

1 Solution

Accepted Solutions
woshua5550
Creator III
Creator III

Try this

=Sum({<[counting period]={$(=Concat(Distinct [counting period]-1,','))}>}revenue)

View solution in original post

18 Replies
woshua5550
Creator III
Creator III

Try this

=Sum({<[counting period]={$(=Concat(Distinct [counting period]-1,','))}>}revenue)

agigliotti
Partner - Champion
Partner - Champion

maybe this:

=sum( {< [counting period] = {">=$((=min([counting period])-( GetSelectedCount([counting period])-1 ) ))<=$(=min([counting period]))"} >} revenue )

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Hi Dave,

Its working well only its not giving me any data for 1 counting period

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

I am using the following expression

if(H1='Previous Completed Quarter', Sum({<Quarters={$(=Concat(Distinct Quarters-1,','))} ,[Accounting Period]={$(=Concat(Distinct [Accounting Period]-3,','))}>}[Service Rev]),

if(H1='Recent Completed Quarter',sum({$}[Service Rev]))

))

where h1 is the header  and quarters are fetched from accounting period as follows.

quarters accounting period

  1               1,2,3

  2               4,5,6

  3               7,8,9

Problem is data is showing correctly for quarter>1 , but for quarter 1 no data is being shown

woshua5550
Creator III
Creator III

because when you select quarter 1 it will calculate 'quarter 0' which is not exist

what data do you want to show for 1 counting period ?

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Capture123.JPG

Hi Dave this is the view I am trying to create , yes I agree that previous data for quarter 1 should not reflect, but it should show me quarter 1 data under recent completed quarter.

woshua5550
Creator III
Creator III

I don't think 'H1' makes sense,you may need to get rid of it ,just go with two expressions like this

expression for previous completed quarter :

Sum({<Quarters={$(=Concat(Distinct Quarters-1,','))}[Service Rev])

expression for recent completed quarter :

Sum([Service Rev])

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Hi Dave,

My requirement consists of multiple headers thus I have to make inline headers. I cannot use differnet measures for previous and current.

woshua5550
Creator III
Creator III

ok , then we can combine the two expressions and try

IF(H1='Previous Completed Quarter',Sum({<Quarters={$(=Concat(Distinct Quarters-1,','))}[Service Rev]),Sum([Service Rev]))

you may need to attach your qvf file if it still doesn't work