Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

SubStringCount function issue

Dear all,

I have  inline load and loading dimensions into table , and applying  =SubStringCount(Concat($Field, '|'), 'Level 4 Mgr Name')

it giving me zero o/p but it should give 1 for ad-hoc reporting.

QVW is attached .

Base on selection in list  o/p should  0 /1

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
1 Solution

Accepted Solutions
sunny_talwar

Try this in that case:

=SubStringCount('|' & GetFieldSelections(dimension_1, '|', 10000) & '|', '|Level 4 Mgr Name|')

View solution in original post

15 Replies
sunny_talwar

Try this:

=SubStringCount(Concat(DISTINCT dimension_1, '|'), 'Level 4 Mgr Name')

sunny_talwar

Not sure why you are using $Field? because $Field doesn't contain any value of Level 4 Mgr Name

Capture.PNG

vikasmahajan
Author

Thanks Sunny

used this formula still i am not getting results - see attached qvw.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
vikasmahajan
Author

Even if we use dimension_1 still not getting result.

?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

When I open you application, I am seeing this

Capture.PNG

Are you not seeing this?

vikasmahajan
Author

I want when user select 1 and when user de-select 0 for ad-hoc reporting i want this function.

Viikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
settu_periasamy
Master III
Master III

May be this..

=if(GetSelectedCount(dimension_1)>0,

SubStringCount(Concat(DISTINCT dimension_1, '|'), 'Level 4 Mgr Name'),0)

sunny_talwar

Try this in that case:

=SubStringCount('|' & GetFieldSelections(dimension_1, '|', 10000) & '|', '|Level 4 Mgr Name|')

sunny_talwar

I think it might be better to use GetFieldSelections, rather than using the If with Concat here. Just my opinion