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

How to display only if there is data (Filter Pane) ?

Hi,

I would like in my sheet to display in a filter pane the data only if it shows me the graph.

For example, here I have no data for these dates, so I would like these dates not to be present in the filter pane:

Masterclass77_0-1615546975897.png

For these dates I have a lot of data so they remain visible :

Masterclass77_1-1615547245084.png

 

Thank's for your future help 🙂 

And sorry for my english, i'm french ^^

1 Solution

Accepted Solutions
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @Masterclass77 !

            Try to change moving the TEMPS table to the end of the script and add this "Exists" function like below:

joaopaulo_delco_1-1615556930825.png

 

 

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

7 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @Masterclass77 !

             You should resolve this situation in the script. Can you share your script for take a look?

Help users find answers! Don't forget to mark a solution that worked for you!
rbartley
Specialist II
Specialist II

Hi,

You need use the P() modifier, which returns only the possible values.  Just replace "Date Field" in the expression below with the name of your date field.  

=aggr(only({1< [Date Field]= p( [Date Field])>} [Date Field]),[Date Field])

 

 

Masterclass77
Contributor II
Contributor II
Author

Yes,

Expression of Filter Pane :

Masterclass77_0-1615551666473.png

The Graph : 

Masterclass77_1-1615551924201.pngMasterclass77_2-1615551944790.png

 

And Data model in QS :

Masterclass77_3-1615552014469.png

Masterclass77
Contributor II
Contributor II
Author

i don't have a date field but a time table in my BDD with : ID_TIME, YEAR, MONTH, DAY

This is my expression in my filter pane :

Masterclass77_4-1615552577616.png

 

rbartley
Specialist II
Specialist II

It would make sense to include a date field in your load script so that you don't have to repeat this expression every time you want to use the date.  It will also be simpler to modify the filter pane.

If you export and post the qvf file, it will make it easier for people to help you.  If the data is confidential, find a way of replacing the confidential data and then post it.

joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @Masterclass77 !

            Try to change moving the TEMPS table to the end of the script and add this "Exists" function like below:

joaopaulo_delco_1-1615556930825.png

 

 

Help users find answers! Don't forget to mark a solution that worked for you!
Masterclass77
Contributor II
Contributor II
Author

It's good thank's a lot !!  😊