Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
Would like to ask for some help please? I have 2 issues:
1) Is there a way to modify this formula to not count weekends?
Solved! Go to Solution.
Here is a measure expression that gives your desired result.
WD to Date This Month =
VAR __days =
CALENDAR (
EOMONTH (
TODAY (),
-1
) + 1,
TODAY ()
)
RETURN
COUNTROWS (
FILTER (
__days,
NOT (
WEEKDAY ( [Date] )
IN {
1,
7
}
)
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Sure. It is just a variation of the first one (just changed the 2nd term of the CALENDAR().
WD This Month =
VAR __days =
CALENDAR (
EOMONTH (
TODAY (),
-1
) + 1,
EOMONTH (
TODAY (),
0
)
)
RETURN
COUNTROWS (
FILTER (
__days,
NOT (
WEEKDAY ( [Date] )
IN {
1,
7
}
)
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Actually I found the answer for number 2:
Here is a measure expression that gives your desired result.
WD to Date This Month =
VAR __days =
CALENDAR (
EOMONTH (
TODAY (),
-1
) + 1,
TODAY ()
)
RETURN
COUNTROWS (
FILTER (
__days,
NOT (
WEEKDAY ( [Date] )
IN {
1,
7
}
)
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Its exactly what im looking for @mahoneypat.Thanks for helping me out with the first question! I hope you can also help me with the other one please?
Sure. It is just a variation of the first one (just changed the 2nd term of the CALENDAR().
WD This Month =
VAR __days =
CALENDAR (
EOMONTH (
TODAY (),
-1
) + 1,
EOMONTH (
TODAY (),
0
)
)
RETURN
COUNTROWS (
FILTER (
__days,
NOT (
WEEKDAY ( [Date] )
IN {
1,
7
}
)
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thank you so much! 😃
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
76 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |