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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
bgierwi2
Frequent Visitor

Getting Count of Entries in Current Month

Completed Date
5/16/25
5/2/25
4/15/25
3/14/25
2/1/25
1/20/25
12/10/24

 

This entry is formated as a Date

Would like to get a visual that shows the number of entires in "Completed Date" that are in the current month

For May 2025, the visual would say "2"

If the current month was April 2025, the visual would be "1"

Etc

1 ACCEPTED SOLUTION
Jai-Rathinavel
Super User
Super User

@bgierwi2 Create the below measure and let me know if I had resolved your ask

CurrentMonthCount = 
CALCULATE(
    COUNTROWS('YourTableName'),
    FILTER(
        'YourTableName',
        YEAR('YourTableName'[Completed Date]) = YEAR(TODAY()) &&
        MONTH('YourTableName'[Completed Date]) = MONTH(TODAY())
    )
)

 




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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Ashish_Excel
Super User
Super User

Hi,

Create a Calendar table with calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number column.  Create a relationship (Many to One and Single) from the Date column of your Fact table to the Date column of the Calendar table.  To your visual, drag Year and Month name from the Calendar table.  Select a Year and Month name.  Write this measure

Measure = countrows(Data)

Hope this helps.

Ritaf1983
Super User
Super User

Hi @bgierwi2 

If I understand correctly, your goal is to show a count of entries for the month the report is being viewed — meaning each month the report is opened or refreshed, it will automatically show the count for the current calendar month.

If that's the case, you can use a measure like this (and name it something like Current Month Count):

DAX
Entries This Month =
CALCULATE(
COUNTROWS('YourTable'),
MONTH('YourTable'[Completed Date]) = MONTH(TODAY()),
YEAR('YourTable'[Completed Date]) = YEAR(TODAY())
)
This will return the number of entries whose Completed Date falls within the current month.

However, if your goal is not to always show the current month but rather display counts by month (e.g. in a bar or line chart), you should build a proper calendar table with the desired granularity (e.g. year/month), relate it to your transaction table, and use that in your visuals.

More information about working with the dates table by the link
👉 Creating a Date Table in Power BI

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Jai-Rathinavel
Super User
Super User

@bgierwi2 Create the below measure and let me know if I had resolved your ask

CurrentMonthCount = 
CALCULATE(
    COUNTROWS('YourTableName'),
    FILTER(
        'YourTableName',
        YEAR('YourTableName'[Completed Date]) = YEAR(TODAY()) &&
        MONTH('YourTableName'[Completed Date]) = MONTH(TODAY())
    )
)

 




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