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: 
Not applicable

Getselectedcount in multiple fields

Hi,

could anybody give me an advice about how to use getselectedcount function for more fields? I have several dimensions started by Row.* and I would like to show expression only if there is no selection made in any of dimension Row.*

Thank you.

L.

1 Solution

Accepted Solutions
Kushal_Chawda

Please see the attached

View solution in original post

9 Replies
maxgro
MVP
MVP

if you have few Row fields

if(  GetSelectedCount(Row1)+GetSelectedCount(Row2)+...+GetSelectedCount(Rown)=0,

     'no selections',

     '...'

  )

Not applicable
Author

thank you, but the thing is...i dont want to write all the row field individually. I would like to find a solution which offer a possibility to just write Row* which cause that expression will consider all fields beginning on "Row"

settu_periasamy
Master III
Master III

may be Try this,

if(isnull(wildmatch(GetCurrentSelections(),'Row*')), yourexpression)

or

if(isnull(SubField(wildmatch(GetCurrentSelections(),'Row*'),'Row'))

Kushal_Chawda

Please see the attached

MayilVahanan

Hi

You can try like this

If(SubStringCount(getcurrentselections (',') ,'Row') = 0, YourExpression, 0)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thank you very much. I have tried all the possibilities that you suggested (substringcount and wildmatch) and they all works so far.

You made my day

Not applicable
Author

Hi all,

I also want to find do a GetSelectedCount on multiple (many, specific) fields, but my fields do not have a consistent name.  Does anyone know whether there is a way to apply to GetSelected count to multiple fields using either a set expression on the system variables such as:

sum( {< [$Table] =- {'CATEGORY_TOUCHPOINT_BY_DATE','MasterCalendar'}>} GetSelectedCount($Field)  )

or maybe a GetSelectedCount on a group of fields, e.g.:

GetSelectedCount([All Non-Aggr Fields])

where [All Non-Aggr Fields] is a cycle group I set up with all the fields in it that I wish to evaluate (in this case, all the fields not in the CATEGORY_TOUCHPOINT_BY_DATE field or the MasterCalendar field)?

There are more than 50 fields I want to include, so enumerating them by hand would be super cumbersome and hard to maintain.  I realize I could rename all the fields to have a consistent start, and then this solution should work, but I'd rather not rename all my nice, human readable fields just for this logic.

Thanks in advance for any help you can offer!

RSvebeck
Specialist
Specialist

Hi


Do you actually want to check selections in 50 particular fields, or are you looking for a solution where there is a selection in "any" field?

Svebeck Consulting AB
Not applicable
Author

Hi Robert - Thanks for replying! 

I was trying to figure out whether there were selections in any of the fields in three of my five tables (but I didn't care about selections in the other two tables).

I ended up with a different approach using the GetCurrentSelections wildmatched against the fields in those three tables:   Re: Expression dependent on which tables fields' are filtered