Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Folks,
I'm a newbie needing help from gurus like you.
I need to add a column that assigns a date which is 30 days prior today based on a condition. I tried using Power Query Editor and below is what I have. It's giving me ERROR for condition 1.
= Table.AddColumn(#"Added Conditional Column", "SystemDate 2", each if [BT Class 2] = "PRIORB" then Date.Day(-30) else [System Date])
I tried using Today() but also didn't work.
Thanks for your help.
Solved! Go to Solution.
You can use this expression to get 30 days ago
Date.AddDays(Date.From(DateTime.LocalNow()), -30)
Pat
You can use this expression to get 30 days ago
Date.AddDays(Date.From(DateTime.LocalNow()), -30)
Pat
Thank you very much. It worked like magic.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.