Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
t_donnet
Partner - Creator
Partner - Creator

Ignore all fields from one table without Set Analysis

hi,

I've a condition to establish.

If one or more fields from a specific table is selected -> value A else value B.

I try to avoid all fields from a calendar table. Any way to ignore those fields without set analysis ?

 

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You could do something like this to avoid listing the field values manually:

=if( 
   $(=concat({<[$Table] = {'MasterCalendar'}>}'getSelectedCount(['& $Field &'])', '+')) > 0, 
   'Value A (One or more calendar field is selected)', 
   'Value B (No Calendar field values are selected)'
)

 

View solution in original post

7 Replies
Vegar
MVP
MVP

You can't really check if any field in a table is selected, but you can check for each field in the table using getSelectedCount() .

Vegar
MVP
MVP

You can't really check if any field in a table is selected, but you can check for each field in the table using getSelectedCount().

t_donnet
Partner - Creator
Partner - Creator
Author

I was going to use getSelectedCount() and yes that's a good way for a few fields.

But how about more than 20 fields?

jfkinspari
Partner - Specialist
Partner - Specialist

You could create a variable, that loops over all fields in the calendar table and create the corresponding set analysis syntax, that you then can use in your measure
sunny_talwar

May be this is one of the options you can try

Ignore all selections except some specific fields using Set Analysis

Vegar
MVP
MVP

You could do something like this to avoid listing the field values manually:

=if( 
   $(=concat({<[$Table] = {'MasterCalendar'}>}'getSelectedCount(['& $Field &'])', '+')) > 0, 
   'Value A (One or more calendar field is selected)', 
   'Value B (No Calendar field values are selected)'
)

 

t_donnet
Partner - Creator
Partner - Creator
Author

That's what I'm looking for.

Thanks a lot @Vegar