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 a list of date and time per item. I need to add a calculated column wherein if a time falls between the below ranges they should be classified as follows:
A.) 4:00 AM - 3:59 PM
B,) 4:00 PM - 3:59 AM
Would you be able to help me with a DAX code for this calculated field? Below is an example of how it should like (Column D).
I am using Direct Query for the data.
Any help is greatly appreciated. Thanks!
Best regards,
Mark V
Solved! Go to Solution.
Hi,
This calculated column formula will work
=if(and(mod(Data[Creation date],1)>=time(4,0,0),mod(Data[Creation date],1)<=time(15,59,0)),"4 AM - 3:59 PM","4 PM - 3:59 AM")
Hope this helps.
Hi,
This calculated column formula will work
=if(and(mod(Data[Creation date],1)>=time(4,0,0),mod(Data[Creation date],1)<=time(15,59,0)),"4 AM - 3:59 PM","4 PM - 3:59 AM")
Hope this helps.
You are welcome.
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 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |