Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Guys,
in the M language, how could I get just the month and year of each column so that I can perform a comparison?
For exemplo:
(Column data_alteracao_status) (CreatedDate)
if 11/2022 < 10/2022 then null
I would like to compare month and year only, without full date
Solved! Go to Solution.
in case of no less I wrote "OK". instead you can paste what you want
if
Number.From(Date.ToText(
Date.From([data_alteracao_status]),[Format= "yyyyMM"])) <
Number.From(Date.ToText(
Date.From([CreatedDate]),[Format= "yyyyMM"])) then null else "OK"in case of no less I wrote "OK". instead you can paste what you want
if
Number.From(Date.ToText(
Date.From([data_alteracao_status]),[Format= "yyyyMM"])) <
Number.From(Date.ToText(
Date.From([CreatedDate]),[Format= "yyyyMM"])) then null else "OK"The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 41 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 150 | |
| 107 | |
| 64 | |
| 36 | |
| 36 |