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 there,
I was wondering how I would go about grouping data by specific time intervals during the week.
Priority is to calculate the data based on the following filters for the below times:
Production - Monday at 12:00 am - Friday at 11:00 pm.
Maintenance - Friday at 11:00 pm-Saturday at 4:59 pm
Non - Production - Saturday at 5:00 pm - Sunday at 3:00 pm
Maintenance - Sunday at 3:00 pm - 11:59 pm
Thanks
Solved! Go to Solution.
Hi @ameerehs ,
Try to do like this, please refer to my .pbix file.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Whay I'm doing wrong?....
I'm trying to use DAX formula in a new column name RealShft but I just can't.
Thanks for helping.
Thanks @amitchandak , I have tried using that but doesnt seem to recognize the Non -Production time period.
Hi @ameerehs ,
Try to do like this, please refer to my .pbix file.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ameerehs , Try like
a new column
Switch(true() ,
Weekday([Datetime],2) in {1,2,3,4} , "Production",
Weekday([Datetime],2) =5 && hour([Datetime]) <=23 , "Production",
(Weekday([Datetime],2) =5 && hour([Datetime]) <=23 ) , "Production",
(Weekday([Datetime],2) =5 && hour([Datetime]) >23) && (Weekday([Datetime],2) =6 && hour([Datetime]) <17) , "Maintenance" ,
(Weekday([Datetime],6) =6 && hour([Datetime]) > 17) && (Weekday([Datetime],2) =6 && hour([Datetime]) <= 15), "Non - Production" ,
"Maintenance"
)
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |