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: 
calvintang
Contributor III
Contributor III

Make Count of Dimensions as a new Dimension

Data frame:

Date | Customer ID | Item Code

12/12/2021 | 12 | 74

12/12/2021 | 12 | 90

13/12/2021 | 1 | 89

13/12/2021 | 90 | 92

On the 12th, it should have a Count(Distinct [Item Code])) of 2, where there will be a count of 1 customer. 

On the 13th, it should have a Count(Distinct  [Item Code])) of 1, where there will be a count of 2 customers.

I am not sure of the syntax on Data Load Editor to achieve this.

 

Thanks!

 

Labels (1)
3 Replies
MarcoWedel

MarcoWedel_1-1640715183371.png

MarcoWedel_0-1640715162249.png

You expect Count(Distinct  [Item Code]))  to deliver only one distinct Item Code in this case?

 

calvintang
Contributor III
Contributor III
Author

I wish to have a measure as a dimension, then from that dimension, I will pair it with a measure in a bar chart to show the number of customers grouped by the number of distinct purchases made in that particular date.

Is this clearer?

calvintang
Contributor III
Contributor III
Author

Hi Marco, 

I see your point now. What I meant was:

On the 13th, I know that there were 2 different products sold, but from a customer viewpoint, they bought only 1 item. 

For both customers, they are grouped under those who purchased only 1 item. 

The formula used in the example above should be ignored. I hope this is clearer.