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.
So I am familiar with the datediff command, but I have some cells in my time columns that are N/A because we did not measure those times. I am trying to use the datediff command to calculate the difference in times between two columns, but I can't do so because not all of the cells in the column have a time in them. How do I get around this?
Update:
Here is my DAX code:
Column = IF('Time Log'[Start Time] = "N/A", "N/A", DATEDIFF('Time Log'[Start Time],'Time Log'[End Time], minute))
I am getting the following error: Expressions that yield variant data-type cannot be used to define calculated columns.
How do I fix this?
"N/A" is text and DATEDIFF returns a number. You need the two return values to agree in type. I would just return null for N/A
Column = IF('Time Log'[Start Time] = "N/A", BLANK(), DATEDIFF('Time Log'[Start Time],'Time Log'[End Time], minute))
Proud to be a Super User!
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 | |
76 | |
74 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |