Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count of IDs based on filter selection.

Hi All,

Consider the below scenario ,

test:

Load * inline

[

Id, date

1,1/2/2016

2,2/4/2017

3,3/3/2016

];

and calendar table where date is key field.


Suppose I have filters like quarters, year , month. If I select any year (2016), it should display count ids which have dates greater than the current selected year. Same logic would be for month filter as well.


i would be thankful if Any one can help me on this



4 Replies
its_anandrjs

Try with Set analysis in the expression

Count({< Year = { "$(=GetFieldSelections(Year)-1)" }>} id)

Anonymous
Not applicable
Author

Hi Anand,

Thanks for your  response.

The solution provided is not serving the purpose.I will play with the expressions and see if i can get solution

Refer the screenshot below.

This image represents data with no selection.

Tno selection.png

with selection_year.png

When I select year as 2016, there are 4 records with date as 2016. Desired output should be count ids greater than 2016. i.e 2.

Same way when i select month filter it should display count of ids greater than the month selected. Should be Dynamic.

Please let know if there is any way

Thanks in advance for the help.

Frank_Hartmann
Master II
Master II

whats the format of your datefield?

Anonymous
Not applicable
Author

DD/MM/YYYY is the format