Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
40 |