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 all! I'm still learning how to use Power BI, Currently im stuck in this problem.
I need to get the difference between two dates from 2 different tables and i need to exclude the weekends.
I used datediff but ofcourse i need to filter out the weekends. I tried several solutions i found here in the community but still doesnt solve my problem. 😞
dear my friend use this formula
There are many ways to solve this. One way I like is to add a column in a calendar table that indicates week days vs weekends. You could put 1 for a week day and 0 for a weekend.
Read about calendar tables here https://exceleratorbi.com.au/power-pivot-calendar-tables/
in this case the calendar table would not be joined to your data table. Read about that here https://powerpivotpro.com/2016/12/how-many-working-days-has-an-employee-been-off-work/
you can then write a measure that filters your calendar table and adds up the weekday column.
Working days =
var start = table[startdate]
var end = table[enddate]
Return calculate(sum(calendar[working days]),(filter(calendar, calendar[date] >= start && calendar[date]<=end))
Hi i actually created a column which determines if that day is a weekday or weekend.
And then i created a column that relates to other table.
Here is the calculated column i created:
And here is the result: Im not getting the correct answer. 😞
i tried the solution below but i cant declare the other table
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 |