Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
RichOB
Post Patron
Post Patron

Need help adding a date measure to a distinct count measure

Hi, I need help getting a distinct count in a date range. My end goal is to get the count of Total_Clients and the distinct count for Total_Individual_Clients for Fiscal_Quarter 1 and 2 only.

 

As per the table below, I need the numbers to show Q1 as:

Client_ID Count = 6
Total_Individual_Cleints = 4 

 

and Q2

Client_ID Count = 8
Total_Individual_Cleints = 4

 

My DAX for the Fiscal Quarter column:

Fiscal Q = "Q" & QUARTER(EDATE('Sheet1'[Date], -3))

Measure for Q1 and Q2 date range:
2024_Q1_Q2_Client_Count =
CALCULATE(
    COUNT('Sheet1'[Client ID]),
    'Sheet1'[Date]>=DATE(2024,4,1),
    'Sheet1'[Date]<=DATE(2024,9,30)
 

If I put the Fiscal_Q in the X axis of a graph and the 2024_Q1_Q2_Client_Count in the Y Axis, it's exactly what I need. 

 

I'm having trouble getting the distinct count of the Client_ID within the same date parameters only showing Q1 and Q2. How can this be achieved, please?


Client_IDDateFiscal_Quarter
111101/04/2024Q1
222201/04/2024Q1
333301/05/2024Q1
111101/05/2024Q1
444401/06/2024Q1
444401/06/2024Q1
888801/07/2024Q2
333301/07/2024Q2
333301/07/2024Q2
222201/08/2024Q2
333301/08/2024Q2
444401/08/2024Q2
444401/08/2024Q2
222230/09/2024Q2
444401/10/2024Q3
555501/10/2024Q3
222201/10/2024Q3


Thanks for your help!

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@RichOB,

 

Use DISTINCTCOUNT instead of COUNT for Total_Individual_Clients.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@RichOB,

 

Use DISTINCTCOUNT instead of COUNT for Total_Individual_Clients.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.