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.
Hi,
I have data as follow:
Person Name | Joining Date | Man hours |
A | 1/10/2021 | 1275 |
B | 23/03/2021 | 950 |
C | 12/4/2021 | 700 |
D | 5/5/2021 | 250 |
In every week of 5 days, total workhours are 45.
I have a date slicer showing range of dates,I calculated no.of weeks in that duration and multiplied with 45 (Workhours of a week), Now I want to show comparison between total workhours and manhours in that duration. If a person joined in middle of selected duration then I want to show comparison only from his/her joining date and all previous values must be blank.
Please help me to do.
Thanks,
AshDil.
Solved! Go to Solution.
Hi @AshDil ,
Try the following formula:
Measure =
DATEDIFF(
MINX( {MIN('Date'[Date])}, {MIN('Table'[Joining Date])} ),
MAXX( {MAX('Table'[Joining Date])}, {MAX('Date'[Date])} ),
DAY
) / 7 * 45
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AshDil ,
Try the following formula:
Measure =
DATEDIFF(
MINX( {MIN('Date'[Date])}, {MIN('Table'[Joining Date])} ),
MAXX( {MAX('Table'[Joining Date])}, {MAX('Date'[Date])} ),
DAY
) / 7 * 45
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@AshDil , A measure can help in total hours in selected range
measure =
VAR _max = MAXX(allselected("Date"),"Date" [Date])
var _min = MinX(allselected("Date"),"Date" [Date])
return
datediff(_min, _max,day)/7 *45 // or //datediff(_min, _max,week)45
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 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |