Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
daviddiener
Partner - Contributor II
Partner - Contributor II

Make set analysis immune to all but one selection

Hi, I have the following Set Analysis on a bar chart:

 

=count({1<
SDTL_AUSPACKDATUM={">=$(v_Datum2YearsAgo) <=$(v_DatumToday)"}
>}Distinct SDTL_REFERENZ_NR)

 

I included  "1" to make the chart immune against all selections. Now i want to make an exception for 1 specific selection, so the charts is affected by it's selection. How could i do this?

 

Thanks in advance 🙂

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Maybe like this: (Assuming you want selections in the YourDimesion field to affect the chart.)

count({1<
   SDTL_AUSPACKDATUM={">=$(v_Datum2YearsAgo) <=$(v_DatumToday)"},
   YourDimension = P(YourDimension)
>}Distinct SDTL_REFERENZ_NR)

View solution in original post

2 Replies
Vegar
MVP
MVP

Maybe like this: (Assuming you want selections in the YourDimesion field to affect the chart.)

count({1<
   SDTL_AUSPACKDATUM={">=$(v_Datum2YearsAgo) <=$(v_DatumToday)"},
   YourDimension = P(YourDimension)
>}Distinct SDTL_REFERENZ_NR)

sunny_talwar

@daviddienerIn addition to what @Vegar, you can also try this if it has to be direct selection in the specific field you want to have selection in

=Count({1<SDTL_AUSPACKDATUM = {">=$(v_Datum2YearsAgo)<=$(v_DatumToday)"}, yourDimension = $::yourDimension>} DISTINCT SDTL_REFERENZ_NR)

$::yourDimension will make sure that only direct selection in the field impacts the chart, whereas p(yourDimension) will change if another selection impacts the possible value in yourDimension. May be that is what you want, but I just wanted to list the other option just in case you need that.