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've tried the following if statement in a calculated measure:
TestDate = if(1=1,now(),0)
But instead of a date I am getting this output when I put the measure into a Card:
42K
I've tried changing the format to "Date" but that option is ghosted out. Please do you know how to fix?
Thanks,
CM
Solved! Go to Solution.
Because the value-if-false is not a date. If you replace that with a date value, then you'll be fine.
Example: TestDate = if(1=1,now(),DATE(2017,1,1))
the full output with 15 decimal places is:
42.833606497689999 K
so I think this is a datetimestmp (with 42833 being the 8th April 2017). And the remaining decimal places being the time. But why does Power BI refuse to display this as a date/time?
Because the value-if-false is not a date. If you replace that with a date value, then you'll be fine.
Example: TestDate = if(1=1,now(),DATE(2017,1,1))
Thank you Marcel 🙂
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |