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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculated dimension but displays from 2 columns

I have 5 different event ids out of 8 that I want to aggregate against.  But I then want to display the values in the dimension column from two separate columns. 

Here's my data and it will make sense.

eventID      Category          Group

1               fruit                    something

2               vegetable            something

3               other                  apples

4               other                  oranges

5               vegetable            something    

6               other                   apples

7               other                   oranges

8               other                   bananas

This would display the Category name in the column for my dimension and expressions would only aggregate for 1-5.

if(match(eventID, '1','2','3', '4', '5'),  Category)

What I would like to do is pull only eventIDs 1-5 but in the dimension column display the Category  if 1,2,5 and the Group if 3,4.

Hope this makes sense.

Thank you.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Why is it that the second I post a question the answer comes to me.  It's a two step solution.

First I created the first calculated dimension

=if(match(EventID, '4','1','2','19', '21'),  EventID) 

then set this to not display if null and then hide the column.

then my dimension names column as

=if(EventID =  '4', Category, Group)

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Why is it that the second I post a question the answer comes to me.  It's a two step solution.

First I created the first calculated dimension

=if(match(EventID, '4','1','2','19', '21'),  EventID) 

then set this to not display if null and then hide the column.

then my dimension names column as

=if(EventID =  '4', Category, Group)