Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to write a logic in power query.
If the Dispatched Year = current year then null else Dispatched Year.
I created a custome column like IF [Dispatched Year] = Date.Year(DateYear.LocalNow()) then null else [Dispatched Year] But it does not work.
Thanks
Note that M is case sensitive and your localnow function was wrong.
if [Dispatched Year] = Date.Year(Date.From(DateTime.LocalNow())) then null else [Dispatched Year]
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
It is returning all nulls even for Dispatched Year 2021
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
38 | |
27 | |
26 |
User | Count |
---|---|
100 | |
87 | |
45 | |
43 | |
35 |