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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RichOB
Helper V
Helper V

Need help adding a date range to a measure

Hi, I need to add a date range for my Canada customer count measure please. I currently have:

 

Measure 1: Customer_Count = Count('Sheet1'[Customer_ID])

Measure 2: Canada_Count = CALCULATE('Sheet1'[Canada], 'Sheet1'[Country] = "Canada")
 
The above measures gives me the total Count of 3 for Canada. What can I add to this measure to only show a date range of 01/04/2024 -30/04/2024 so a card displays 2?

 

Customer_IDCountryDate
1Canada01/04/2024
2Canada02/04/2024
3Canada04/05/2024
4USA01/04/2024
5USA08/05/2024
6UK03/04/2024
7UK05/05/2024
8UK01/06/2024
9UK06/06/2024
10UK10/06/2024


Thanks

1 ACCEPTED SOLUTION

Hi,
you can try add one more filter inside calculate like this.
Canada_Count =
CALCULATE(
COUNT('Sheet1'[Customer_ID]),
'Sheet1'[Country] = "Canada",
'Sheet1'[Date] >= DATE(2024, 4, 1),
'Sheet1'[Date] <= DATE(2024, 4, 30)
)

View solution in original post

2 REPLIES 2
Thennarasu_R
Responsive Resident
Responsive Resident

Hi @RichOB 
Below mention calculation only for the  April Month Count .

Canada_Count = CALCULATE('Sheet1'[Canada]'Sheet1'[Country] = "Canada"),AND(Date Colum>=01/04/2024,Date column<=30/04/2024)

Thanks,
Thennarasu R

If answered your questions mark accepeted a solution and give kudo !

Hi,
you can try add one more filter inside calculate like this.
Canada_Count =
CALCULATE(
COUNT('Sheet1'[Customer_ID]),
'Sheet1'[Country] = "Canada",
'Sheet1'[Date] >= DATE(2024, 4, 1),
'Sheet1'[Date] <= DATE(2024, 4, 30)
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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