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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple values for one dimension

Hello,

I want to create an expression to check if a dimension has more than one value.

For example:

Customer ID     Product ID

11                        1

11                        2

15                        3

15                        4

16                        5

Customer 11 has 2 products.

I want an expression to check if one customer has 1 product or more than one.

Thanks!

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

if your Dimension is Single(Customer ID only), you can try the normal expression in straight table, like

=if(Count([Product ID])>1,'More than One','One')

if you have more dimension, you need to try the aggregation like

=if(Aggr(Count([Product ID]),[Customer ID])>1,'More than One','One')

View solution in original post

1 Reply
settu_periasamy
Master III
Master III

Hi,

if your Dimension is Single(Customer ID only), you can try the normal expression in straight table, like

=if(Count([Product ID])>1,'More than One','One')

if you have more dimension, you need to try the aggregation like

=if(Aggr(Count([Product ID]),[Customer ID])>1,'More than One','One')