The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
We have a Postgresql database which Power BI can talk to. We have an Invoice table which has a posteddate field which is a data type of date. Sometimes this date is blank and the PBI ISBLANK() function does not work reliably with a blank date. I made a new column in the Invoice table:
Myposteddate = IF(ISBLANK(Invoice[posteddate])=TRUE,TODAY(),Invoice[posteddate)
When Invoice.posteddate was blank, sometimes today's date was inserted, sometimes it wasn't. So here's how I fixed it. I went to power query:
It works great and it works every time for all records! And year 9999 should never happen for quite a long time. 🙂
@croberts21 , Based on what I got
if the datatype is date or datetime in power bi then it should have null value in power query. if text it can have other values
replace null with nay date and then change code manually to
DateTime.Date(DateTime.LocalNow())
In the power query step
You can check for date of 1899/12/31 or 1900/01/01 also and replace it
"In the power query step You can check for date of 1899/12/31 or 1900/01/01 also and replace it"
That will work too.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
108 | |
82 | |
77 | |
46 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
53 |