Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count Distinct per Dimension

Hi All,

I have a straight table which has dimensions week day and date. I have an expression "Count(DISTINCT([Grower No.]))", which counts the distinct number of growers in the least.

How do I tweak this expression so that it shows distinct number of growers per date? At the moment it has the same value for each date which is the distinct number of growers in the whole subset.

Thank you

Herbiec

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The problem most probably lies in your data model, where the date is not properly associated with the table containing Grower No. I suggest that you upload a sample of your model (click 'Use advanced editor' at the top left of the reply entry screen). or at least provide a lot more information about your model.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Count(DISTINCT(Aggr([Grower No.],myDate)))

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The problem most probably lies in your data model, where the date is not properly associated with the table containing Grower No. I suggest that you upload a sample of your model (click 'Use advanced editor' at the top left of the reply entry screen). or at least provide a lot more information about your model.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tresesco
MVP
MVP

If you use weekday as dim1 and date as dim2, your expression should give you what you want.

Not applicable
Author

Spot on Jonathan,

My associations were a bit of, once I had them realigned, it worked perfectly.

Much appreciated.

H