Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vschowdary
Contributor II
Contributor II

Total distinct count for different date ranges

HI All,

Hope every one is doing good.

i am having 2 years of data in table and need to create the 3 KPI's which are belongs to different  date ranges 

1. i want get total distinct count  from 0 to 30 days in KPI

2. want to total distinct count from 31 to 60 days

want to get the count for >60 days  in 3 kpis.

Can you please help me on priority.

 

 

 

Labels (3)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

You can use the following expressions in the KPIs:

  • Count(DISTINCT{<Date={"<=$(=Today())>=$(=Date(Today()-30))"}>}Value)
  • Count(DISTINCT{<Date={"<=$(=Date(Today()-31))>=$(=Date(Today()-60))"}>}Value)
  • Count(DISTINCT{<Date={"<=$(=Date(Today()-61))"}>}Value)

Here is the outcome:

 

As you can see it counts only distinct values for the range that you have mentioned!

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 
 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

1 Reply
Andrei_Cusnir
Specialist
Specialist

Hello,

 

You can use the following expressions in the KPIs:

  • Count(DISTINCT{<Date={"<=$(=Today())>=$(=Date(Today()-30))"}>}Value)
  • Count(DISTINCT{<Date={"<=$(=Date(Today()-31))>=$(=Date(Today()-60))"}>}Value)
  • Count(DISTINCT{<Date={"<=$(=Date(Today()-61))"}>}Value)

Here is the outcome:

 

As you can see it counts only distinct values for the range that you have mentioned!

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 
 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂