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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
M_SBS_6
Helper V
Helper V

Count between dates

Hi, I need to count app_id where date range app_date is between 01/01/2023 and 06/01/2024.

 

Any idea how to write this out please?

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

hello @M_SBS_6 

 

use this measure : 

measure = 
calculate( c

count(table_name[app_id] ,

appdate >="01/01/2023" && appdate >="06/01/2024"
)

 

now the problem is that this measure is fix to this date. 

 

 

what i would recommend to do, is to use the custom slicer : 

Daniel29195_0-1706010089450.png

 

and use this measure instead  :  measure =  count(table_name[app_id])

and use the measure to select the date period to want to display the count for.

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that  thumbs up button 🫡👍

View solution in original post

4 REPLIES 4
M_SBS_6
Helper V
Helper V

Thank you. If I was to add sum(total_app) just I just add that in instead of countrows?

that is correct.

you can any aggregation function you desire (  sum, max, min, count .. ) 

 

@M_SBS_6 

 

 

Daniel29195
Super User
Super User

hello @M_SBS_6 

 

use this measure : 

measure = 
calculate( c

count(table_name[app_id] ,

appdate >="01/01/2023" && appdate >="06/01/2024"
)

 

now the problem is that this measure is fix to this date. 

 

 

what i would recommend to do, is to use the custom slicer : 

Daniel29195_0-1706010089450.png

 

and use this measure instead  :  measure =  count(table_name[app_id])

and use the measure to select the date period to want to display the count for.

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that  thumbs up button 🫡👍

amustafa
Solution Sage
Solution Sage

You can create a DAX measure like this.

 

CountAppIDsInRange =
COUNTROWS(
FILTER(
YourTableName,
YourTableName[app_date] >= DATE(2023, 1, 1) && YourTableName[app_date] <= DATE(2024, 6, 1)
)
)

 





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

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors