The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi
We have the next calculated column to calculate the count of workingsdays between 2 dates.
CALCULATE(
COUNTROWS(Calender),
DATESBETWEEN(Calender[Date],'table1'[first_date],table1'[second_date] -1),
Calender[isworkday] = 1)
Now we want to convert this formula to a measure so we are more flexibel in the calculations.
maybe something with an averagex?
Have someone any idea?
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you have create a column like [IsWorkingDay] using 1 to represent Working Days. You can try DAX formula like below:
Measure = CALCULATE(
COUNTROWS('Calender'),
DATESBETWEEN('Calender'[Date],SELECTEDVALUE('Table1'[first_date]),SELECTEDVALUE('Table1'[second_date])-1),
'Calender'[IsWorkDay]= 1)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you have create a column like [IsWorkingDay] using 1 to represent Working Days. You can try DAX formula like below:
Measure = CALCULATE(
COUNTROWS('Calender'),
DATESBETWEEN('Calender'[Date],SELECTEDVALUE('Table1'[first_date]),SELECTEDVALUE('Table1'[second_date])-1),
'Calender'[IsWorkDay]= 1)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
82 | |
62 | |
54 | |
51 |
User | Count |
---|---|
127 | |
118 | |
81 | |
66 | |
65 |