Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
envdata90
Contributor II
Contributor II

Creating a Master Dimension that restricts to specific measures

I am very much a beginner, so any help is appreciated. 

I have a very large data set (close to 200,000 individual data points) dealing with parcel data. One dimension that is part of this data set is "Classification", basically how the land use is classified. I am looking to make several new master dimensions that restrict the parcel data to a certain classification so then I can create visualizations that are specific to that land use.  I'm not looking to aggregate any measures. I've tried an If, then construct but I think that only works with aggregation. 

Also, there are several kinds of residential classifications. I would like to create a new dimension called "residential" that includes all the residential classifications.

This is a snapshot of the data I'm working with if that helps

Screenshot 2021-03-02 160025.png

Labels (2)
5 Replies
GaryGiles
Specialist
Specialist

A Master Item Dimension defined in the following way would limit rows to Classification = 'Residential'

aggr(only({$<Classification={'Residential'}>} Classification), Classification)

If you are looking for all Classifications that include the word Residential, you would use:

aggr(only({$<Classification={'*Residential*'}>} Classification), Classification)

Hope that helps.

envdata90
Contributor II
Contributor II
Author

I appreciate your help! Unfortunately, that syntax doesn't seem to return any values. I got the other dimensions to work though so thats something!

GaryGiles
Specialist
Specialist

 

Is it 'Residential' or 'residential' in the data.  Qlik is case sensitive.

GaryGiles
Specialist
Specialist

Not sure which formula did not return values.  For the second formula, I forgot to use double quotes " instead of single quotes.

aggr(only({$<Classification={"*Residential*"}>} Classification), Classification)

or

aggr(only({$<Classification={"*residential*"}>} Classification), Classification)

 

envdata90
Contributor II
Contributor II
Author

 The first equation in your last comment worked. Thank you!