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: 
mrbenass
Luminary
Luminary

Set Analysis not working on my text field

I have a super easy set of data that I am trying to use Set Analysis on, but the Set Analysis is not working the way i would expect it to.  I would expect this Set Analysis to return 0 since I have the [Survey Source Category] in my selection bar to show only 'Fudge'.  What can be going wrong here.  I have been using Qlik for 6 years and never seen anything like this not working before.  

Count({$<[Survey Source Category]={'Branch'}>}[Survey Source Category])

 

I have added the dataset as well, wondering if it is a text issue or something like that?

mrbenass_0-1660308973561.png

 

Labels (2)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

Hi @mrbenass ,

Maybe this:

Count( {< [Survey Source Category] *= {'Branch'} >} [Survey Source Category] )

I hope this can help.

Regards

View solution in original post

11 Replies
sidhiq91
Specialist II
Specialist II

@mrbenass  in the Set Analysis When you have defined to filter the data only for 'Branch' and its value will not change based on the User Selection in the filter. 

mrbenass
Luminary
Luminary
Author

But the $ in the front should still respect the filters and then calculate my measure.  So i would think my KPI should return 0.  It does work on other fields from my original dataset but for some reason just not on this column called [Survey Source Category].

BrunPierre
Master
Master

@mrbenass $ in the front mean for all records in the current selection. But as @sidhiq91 explained once a filter is set within i.e. [Survey Source Category]={'Branch'} the outcome is unaffected by user selection.

mrbenass
Luminary
Luminary
Author

Maybe I am not understanding. 

The current selection in the app is [Survey Source Category] = 'Fudge'.  How can the set analysis return the 1 record where the [Survey Source Category] = 'Branch' if the current selection can not have any records where the [Survey Source Category] = 'Branch'?  The dataset is limited to only show 'Fudge' so therefore the KPI should show a 0 and not a 1.  @BrunPierre 

BrunPierre
Master
Master

luizcdepaula
Creator III
Creator III

The $ in front will respect filters from other dimensions, not the same one, in this case [Survey Source Category].

If you make selections on other dimensions, you will see that it might change, if you select a value where there is no Branch as part of that data. For example, make a selection on one of those CloudCherryIDs that belong only to Fudge, you will se the KPI will be 0.

Luiz

agigliotti
Partner - Champion
Partner - Champion

Hi @mrbenass ,

Maybe this:

Count( {< [Survey Source Category] *= {'Branch'} >} [Survey Source Category] )

I hope this can help.

Regards

BrunPierre
Master
Master

Is the dataset limited to 'Fudge' in the entire model or just to an object?

mrbenass
Luminary
Luminary
Author

Looks like you are correct, that is weird.  To work around my scenario I had to create a duplicate column with the same fields on it.  I will allow the user to select from one of the fields and use the other duplicate filed for the Set Analysis then.  Thanks!! @luizcdepaula 

Unless anyone else knows another workaround for this?