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 I'm trying to create a column where I check if the time right now is greater or less than the timestamp I have in another column. Problem is that this column also has the date in it, which means that when I do a simple if statement, the time now will always be greater than the other column.
Is there a way to solve this? btw I can't do this in power query so must be done using dax.
example:
Timestamp | time | now | greater or less than time now |
02.11.2020 08:00:00 | 08:00:00 | 12:46:00 | 1 |
30.10.2020 12:54:51 | 12:54:51 | 12:46:00 | 0 |
I get time directly from timestamp by changing datatype.
Now is simply = Now()
Greater or less than time now = if (table[now) > table[time], 0, 1)
This last measures gives all 1s now because now is abviously always greater than previous dates but I want that calculation to ignore that. Can this be done using dax?
Thank you!
Solved! Go to Solution.
You can get only time like this
time(hour(now()),minute(now()),second(now()))
Hi, Plz find the below approach
Hi, Plz find the below approach
You can get only time like this
time(hour(now()),minute(now()),second(now()))
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 |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |