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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count(Total<D1> F1) Question

Can I use a dimension D1 in the total with out actually using that in the chart? Please advice.

Count(Total<D1> F1).

Thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

in a textbox?

sum(aggr(Count(DISTINCT ID), YEAR))

View solution in original post

6 Replies
MK_QSL
MVP
MVP

no

The Result you will get is

Count(Total F1)

Clever_Anjos
Employee
Employee

Yes you can

Count(Total<D1> F1) returns total count considering your D1 dimension (I supposing you´re using it as a dimension in your graph)

Not applicable
Author

YEARID
2001A1
2001A2
2001A3
2001A4
2002A1
2002A2
2002A3
2002A3
2002A6

How can I count the distinct IDs grouping by year with out actually showing/ selecting the Year field as dimension in the chart. I have other dimensions I will be using on the graph.

Desired result: 8.

Thanks

maxgro
MVP
MVP

in a textbox?

sum(aggr(Count(DISTINCT ID), YEAR))

MK_QSL
MVP
MVP

COUNT(Distinct ID) This will give you COUNT of ALL Distinct ID

Do the Group By YEAR

Aggr(COUNT(Distinct ID),YEAR)          This will create a Virtual Table Year vs Count(Distinct ID)

Now do SUM(of above Expression) This will give you your desired result..

SUM(Aggr(COUNT(Distinct ID),YEAR))

Not applicable
Author

Thanks so much to both Manish and Massimo.