Forum Discussion

a_mixed_life's avatar
a_mixed_life
Icon for Resolver I rankResolver I
9 years ago
Solved

CALCULATE Days Left in the current month

Was wondering if anyone have the DAX calculations to count how many days left in a current month?
  • Anonymous's avatar
    Anonymous
    9 years ago
    Workdays Left in Month = COUNTROWS(
    	FILTER(
    		CALENDAR(
    			TODAY(),
    			EOMONTH(TODAY(), 0)
    		),
    		WEEKDAY([Date], 2) < 6
    	)
    )

    ...assuming that by "working" days you mean Monday through Friday.

     

    The formula I gave previously does not count today as one of the days left in the month. This one does. If you don't want it to count today, you just have to move the start date to tomorrow:

     

    Workdays Left in Month = COUNTROWS(
    	FILTER(
    		CALENDAR(
    			TODAY() + 1,
    			EOMONTH(TODAY(), 0)
    		),
    		WEEKDAY([Date], 2) < 6
    	)
    )