Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybirdsx
Contributor II
Contributor II

Pivot table - remove sub dimension value

Hi

 

i have a pivot table with main dimension is 'Recipe' and Second Dimension (sub dimension) is 'ingredients'

is there a way of excluding showing a sub dimension value 'eggs' in the pivot - by dimension expression ....  without changing the measure expression  

please advise

Labels (1)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Specialist

Is this what you wanted ? Tried using sample data

Data:

Aditya_Chitale_1-1684306041321.png

 

Output:

Aditya_Chitale_2-1684306246104.png

 

Expression used for dimension:

=if(ingredients='eggs', null(), ingredients)

Uncheck null Values option in dimension after applying this expression

 

Regards,

Aditya

View solution in original post

4 Replies
Aditya_Chitale
Specialist
Specialist

Is this what you wanted ? Tried using sample data

Data:

Aditya_Chitale_1-1684306041321.png

 

Output:

Aditya_Chitale_2-1684306246104.png

 

Expression used for dimension:

=if(ingredients='eggs', null(), ingredients)

Uncheck null Values option in dimension after applying this expression

 

Regards,

Aditya

joeybirdsx
Contributor II
Contributor II
Author

That is fantastic thank you x

Regards 

G3S
Creator III
Creator III

Hi Aditya, just out of curiosity, if the requirement was to exclude any recipe that had eggs as ingredient, would it be done thru set analysis? 

or does script need to have a group by ingredient ?

Aditya_Chitale
Specialist
Specialist

@G3S ,

You can achieve this using set analysis with E() function.

Expression : 

sum({$<Recipe=E({1<ingredients={'eggs'}>})>}count)

Output:

Aditya_Chitale_0-1684733589402.png

 

Regards,

Aditya