The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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