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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
satishkurra
Specialist II
Specialist II

Count distinct dates

Hi Team

I'm having an expression in straight table as Count(distinct SalesDate). This is producing me the count I need. Also, the Sales Date is of MM/DD/YYYY format.

Now I'm trying to filter the table to show the records that the count of above expression is >= 300.

Can someone help me with this?

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

@satishkurra  try below

 =sum(aggr(if(Count(distinct SalesDate)>300, Count(distinct SalesDate),Dim1,Dim2)) // Dim1 & Dim2 are staright table dimensions. You need to include all dimensions.

or

Count(distinct {<Primary_Key={"=Count(distinct SalesDate)>300"}>}SalesDate)

View solution in original post

4 Replies
Kushal_Chawda

@satishkurra  try below

 =sum(aggr(if(Count(distinct SalesDate)>300, Count(distinct SalesDate),Dim1,Dim2)) // Dim1 & Dim2 are staright table dimensions. You need to include all dimensions.

or

Count(distinct {<Primary_Key={"=Count(distinct SalesDate)>300"}>}SalesDate)
satishkurra
Specialist II
Specialist II
Author

@Kushal_Chawda : Below expression is working but it is showing the value with 0 as well in the table

2nd expression did not work

sum(aggr(if(Count(distinct [Sales Date]) >= 300, Count(distinct [Sales Date])),[Actual Name],[Product Name]))

Kushal_Chawda

@satishkurra  You need uncheck "Include zero values" option

satishkurra
Specialist II
Specialist II
Author

@Kushal_Chawda 

Yes it is unchecked. The issue is I have some other measures which are 0 and it is not working