Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
poluvidyasagar
Creator II
Creator II

Calculated Dimension using ONLY function?

Hi,

I am trying to achieve the following:

Sample Data:

LocationSublocationPart
AA112345
BB123456
BB212456
CC114678
CC218992
DD118320
DD210302
ABAB110320
ACAB213920
ADAB310401

My Dimensions are:

1. Location

2. Sublocation

However, I do not want to show all Locations as my dimension. I would like to use ONLY function with set analysis ?

I have tried the following but it does not seem to work:

Only ({<{Location-={'AB','AC','AD'}>}Location}

Basically i do not want to show locations with AB, AC, AD. Since this is a sample data set, i am only showing few location. However, i have quite a few locations that i want to show and exclude some. That is why i am going with not contain in set analysis.

Can someone help me on this?

I have attached the sample file.

Thanks,
Vidya

19 Replies
PrashantSangle

Try this

if(wildmatch(Location,'AB','AC','AD'),Location)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
poluvidyasagar
Creator II
Creator II
Author

It does not work

poluvidyasagar
Creator II
Creator II
Author

stalwar1

Hi Sunny,

Can you help me on this one?

jonathandienst
Partner - Champion III
Partner - Champion III

Try this:

Aggr(Only ({<{Location-={'AB','AC','AD'}>} Location), Location)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
neelamsaroha157
Specialist II
Specialist II

Check this out...added expression with if condition as well as set analysis.

poluvidyasagar
Creator II
Creator II
Author

It does not work

poluvidyasagar
Creator II
Creator II
Author

I can't see anything attached

poluvidyasagar
Creator II
Creator II
Author

This worked for me:

=if(Not Match(Location, 'AB','AC','AD'),Location)

Check suppress when value is null

poluvidyasagar
Creator II
Creator II
Author

I would still like to see if this can be achieved using Only function with set analysis

swuehl