Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I've been searching and searching but I can't seem to find the syntax for a measure that will allow me to count the number of Mondays within a date range. The date range will be selected through a slicer on the same page.
What is the DAX syntax in order to do this?
Thanks!
Solved! Go to Solution.
Hi @Anonymous,
Maybe this one? Please share a dummy sample file.
Measure = CALCULATE ( COUNT ( 'Date'[DOW), all('table'[HourBlock] ) )
Best Regards,
Dale
Hi guys,
I would like to get solution as below in Power BI :
@Anonymous
You can use this MEASURE
Measure = VAR selected_dates = ADDCOLUMNS ( GENERATESERIES ( MIN ( Table1[Date] ), MAX ( Table1[Date] ) ), "Weekday", WEEKDAY ( [Value], 3 ) ) RETURN COUNTROWS ( FILTER ( selected_dates, [Weekday] = 0 ) )
@Anonymous
If you want to know which dates are Monday
You can use this MEASURE
Measure 2 = VAR selected_dates = ADDCOLUMNS ( GENERATESERIES ( MIN ( Table1[Date] ), MAX ( Table1[Date] ) ), "Weekday", WEEKDAY ( [Value], 3 ) ) RETURN CONCATENATEX ( FILTER ( selected_dates, [Weekday] = 0 ), [Value], UNICHAR ( 10 ) )
@Anonymous
Please see file attached as well
I need the day of the week to adjust automatically when I add it to my matrix but only be filtered by the column not the row. Right now I'm just using a simple COUNT('Date'[DOW) which works on its own, however in my matrix I have a column titled HourBlock that breaks my count of records (Number) down by hour. Since not every hour within the month filter has records the DOW_COUNT gets filtered accordingly. I don't want it to. I essentially want the values that I see in the small matrix beside the big one which has the official counts of the days of the week.
Hi @Anonymous,
Maybe this one? Please share a dummy sample file.
Measure = CALCULATE ( COUNT ( 'Date'[DOW), all('table'[HourBlock] ) )
Best Regards,
Dale
YES!!!!!! That was exactly what I needed! THANK YOU!!!!
Hi,
Could you share the solution to obtain the number of each day within a date range??
Thanks.
@Anonymous
Please see file attached as well
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |