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,
I have a table that lists all clock ins/outs per person. There's less people working on the weekend but we still want them counted.
For our reporting, we use the average of the 5 weekdays.
The goal is to show a measure that is ALL days, including weekends, and a filter that will let you toggle between all days and turning off the weekend.
I need it to look like: Remove Weekends? Where no is all days and yes removes the weekend to show just weekdays
Thanks!
Solved! Go to Solution.
Hi, @sparkplug93751
Based on your description, I created data to reproduce your scenario.
Table:
Test:
You may create a measure as below.
IsDisplay =
var _flag = SELECTEDVALUE(Test[IsRemoveWeekend])
var _isworkday = WEEKDAY(SELECTEDVALUE('Table'[Date]))
return
IF(
_flag = "no",
1,
IF(
_flag = "yes"&&NOT(_isworkday in {1,7}),
1
)
)
You need to put the measure in the visual level filter and here is the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @sparkplug93751
Based on your description, I created data to reproduce your scenario.
Table:
Test:
You may create a measure as below.
IsDisplay =
var _flag = SELECTEDVALUE(Test[IsRemoveWeekend])
var _isworkday = WEEKDAY(SELECTEDVALUE('Table'[Date]))
return
IF(
_flag = "no",
1,
IF(
_flag = "yes"&&NOT(_isworkday in {1,7}),
1
)
)
You need to put the measure in the visual level filter and here is the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Use WEEKNUM([Column],2) and you wan those < 6. See https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109
Hi, so when I use this in a slicer. How would I structure it?
Would it be the dax you sent where those less than 6 are "Yes" and Those not are "No"?
I need the Yes option to show all 7 days and the No option to Only show the 5 workdays. I've isolated the weekend with a yes no using weekday but when the answer is "Yes" it only selects those that are Saturday or Sunday vs all 7 days
Thanks!
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |