Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi all,
I am trying to create a measure in Power Bi, but I am having difficulties to get the result I want.
I want to count the nº of weekdays between two dates in the same table using direct query mode.
The measure I wanted to create is something like this
Measure = CALCULATE([Week Days]);DATEDIFF(MIN('Table1'[PeriodBegin]);MAX('Table1'[PeriodEnd]);DAY))
The measure 'Week Days' counts the number of days in a column(WeekDay) within Date table that is "1" in a weekend day and "0" in a week day. So measure 'Week Days' counts all the "0"s
I want to get the nº of week days within this analysis between the oldest date (Min Period Begin) and the newest date (Max Period End)
An issue I found using Direct Query Mode is that is not possible to use the "DatesBetween" and "FirstDate" functions.
Please help 😉
Thanks
Hi all,
I am trying to create a measure in Power Bi, but I am having difficulties to get the result I want.
I want to count the nº of weekdays between two dates in the same table using direct query mode.
The measure I wanted to create is something like this
Measure = CALCULATE([Week Days]);DATEDIFF(MIN('Table1'[PeriodBegin]);MAX('Table1'[PeriodEnd]);DAY))
The measure 'Week Days' counts the number of days in a column(WeekDay) within Date table that is "1" in a weekend day and "0" in a week day. So measure 'Week Days' counts all the "0"s
I want to get the nº of week days within this analysis between the oldest date (Min Period Begin) and the newest date (Max Period End)
An issue I found using Direct Query Mode is that is not possible to use the "DatesBetween" and "FirstDate" functions.
Please help 😉
Thanks
Have you tried enabling this options: Options & Settings -> Options -> DirectQuery -> Allow Unrestricted Measures in DirectQuery mode
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
42 | |
30 | |
27 | |
27 |