Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Users, make your voice heard! Participate in Wisdom of Crowds® Market Study: Start Survey
cancel
Showing results for 
Search instead for 
Did you mean: 
mrbalyaqv
Contributor III
Contributor III

GetSelectedCount() for master dimension

Hi all!

I'm trying to achieve following:
- before any selection made, in table there's no fields shown, only totals for measures;
- when user selects some fields from a list, these fields would be displayed in table.
When I use a data field for this 'fields list' all works just fine, but on selection bar real field name is displayed:
1.PNG

I'd want change displayed fields name on selection bar, because the real name could have a realy 'ugly' and not user-friendly name. For this purpose I created a master dimension. And now after selection from this dimension I see its name on selection bar, but displaying of selected columns doesn't work:
2.PNG

I guess, this happens because after selection in master dimension QS makes not same selection in initial field. If I understand correctly, GetSelectedCount() works only for expressions, that reurn field.

I thought about using GetPossibleCount() instead, but I don't know how to determine if it 0 or all values are selected in master dimension.

So, my question is: is it even possible to make selection in master dimenssion and count number of selected values? 

Sample qvf-file attached.

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

This is not perfect, but you can try this

=Count(DISTINCT [_f_pivot_dim]) > 0 and SubStringCount(Concat(_f_pivot_dim, '|'), 'Name') > 0

When nothing is selected, this will show all three dimensions.

View solution in original post

2 Replies
sunny_talwar

This is not perfect, but you can try this

=Count(DISTINCT [_f_pivot_dim]) > 0 and SubStringCount(Concat(_f_pivot_dim, '|'), 'Name') > 0

When nothing is selected, this will show all three dimensions.

View solution in original post

mrbalyaqv
Contributor III
Contributor III

Well, it's not exactly what I tried to do, but I can deal with it. Thank you!