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'm fairly new to Power BI and I'm not sure if this functionality is even avaliable but what I'm trying to do is creating a new conditional column based on a time type column "IssueTime" (08:10:00) to be divided into 3 groups under the conditional column -"Day time" = From: 06:00:00 - 19:59:59, "Night time"=20:00:00 - 05:59:59, Unknowm Time=nulls etc.." .
I don't know if it's even possible and if i should use M code or Dax.
Any ideas?
Help will Much appriciated !
Solved! Go to Solution.
You can accept it as the solution if it works for you
Thanks
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@SHAKEDALROY
Add this as a custom column please:
=if [Issue Time] >= #time(6,0,0) and [Issue Time] <= #time(19,59,59) then "Day Time" else if
[Issue Time] >= #time(20,0,0) and [Issue Time] <= #time(23,59,59) then "Night time" else if
[Issue Time] >= #time(0,0,0) and [Issue Time] <= #time(5,59,59) then "Night time" else null
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
You can accept it as the solution if it works for you
Thanks
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Tried to run that code but unable to make it.
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 |
---|---|
99 | |
50 | |
19 | |
12 | |
11 |