March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have two columns with dates that I would like to compare and create a new custom column in Power Query.
What I want do do is is determine if the [Date] is <= to [Date End of Month]. If it's <= then I want to display "Less than current month" if it's > then I want to display "Greater than current month"
How do I create this custom column?
Solved! Go to Solution.
Hi @Anonymous Try this formula. It returns this, today being July 28, 2020.
=if [Date] >= Date.EndOfMonth(DateTime.Date(DateTime.LocalNow())) then "Greater than Current Month" else "Less than Current Month"
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @Anonymous Try this formula. It returns this, today being July 28, 2020.
=if [Date] >= Date.EndOfMonth(DateTime.Date(DateTime.LocalNow())) then "Greater than Current Month" else "Less than Current Month"
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting
here you can find the functions that could help you to get the result
https://docs.microsoft.com/it-it/powerquery-m/date-isincurrentmonth
Thank you, I actually used those formulas to create some other columns...but I'm not clear how to create an if then clause using >= to compare columns. Any ideas how to an if then comparing columns?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
9 |
User | Count |
---|---|
34 | |
31 | |
20 | |
19 | |
17 |