Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |