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: 
zagzebski
Creator
Creator

Calculated Dimension

This seems like it should be simple.

I need to create a a product straight table with many different expressions.

We have many products but the user is requesting that only one of the products shows up in this table (dimension). I realize just selecting that Product from a list box is the easy way but he is trying to get it so you don't even have to make a selection. So product A is the only one that ever shows up in this table...and the expressions just follow suit.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You could use a variable in the expressions: vProduct. The expression would become sum({$<product={'$(vProduct)'}>}sales). You'll only have to change to variable.

Of course you could also use a calculated dimension instead like if(product = 'A', product) and check the option Suppress When Value Is Null for that calculated dimension.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

You can change the expressions a bit so only results for product A are shown. For example sum(sales) becomes sum( {$<product={'A'}>} sales). That's the most straight forward way to achieve this imho.


talk is cheap, supply exceeds demand
zagzebski
Creator
Creator
Author

Tthanks for the response. I figured I might have to go through the expression. Just thought there might be a simpler way of just doing it one time in the dimension instead of having to incorporate that set analysis into every expression. then if there is a change each one of the expressions has to be updated.

Gysbert_Wassenaar

You could use a variable in the expressions: vProduct. The expression would become sum({$<product={'$(vProduct)'}>}sales). You'll only have to change to variable.

Of course you could also use a calculated dimension instead like if(product = 'A', product) and check the option Suppress When Value Is Null for that calculated dimension.


talk is cheap, supply exceeds demand
zagzebski
Creator
Creator
Author

That works perfect. thanks