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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
markefrody
Post Patron
Post Patron

Count Number of Past Days in Current Month Except Sundays

Hi,

 

Appreciate if you can help me with the following:

 

1.) Is there a DAX in counting the past number of days in the current month excluding today and Sundays?

 

2.) Is there a DAX to count the remaining days of the current month excluding today, Sundays, and past days.

 

Best regards,

Mark

2 REPLIES 2
MarcoPessina
Resolver IV
Resolver IV

Hi @markefrody ,

try these measures:

Days Before Today = CALCULATE(
    COUNTROWS('Date'),FILTER(
        'Date','Date'[Date]<TODAY() && MONTH('Date'[Date])=MONTH(TODAY()) && WEEKDAY('Date'[Date])<>7)
        )
Days After Today = CALCULATE(
    COUNTROWS('Date'),FILTER(
        'Date','Date'[Date]>TODAY() && MONTH('Date'[Date])=MONTH(TODAY()) && WEEKDAY('Date'[Date])<>7)
        )

 Hope it helps.

Cheers,

Marco

@MarcoPessina 

Hi Marco,

Thank  you for the measure. I have tried using it but the number of days are not computing properly. I have attached the sample data for your reference.

 

Sample data

 

Best regards,

Mark V

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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