Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
aashton
Helper V
Helper V

Calculated Column with IF in Query Editor

I have a large spreadsheet I am bringing into my report, and I only need the last month of data.  In DAX, it would be 

IF([Month Year]=MAX([Month Year]), 1, 0)

 

What is the correct syntax to do this in Query Editor?

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

or this

if Date.EndOfMonth([Date]) = Date.EndOfMonth( List.Max(#"Changed Type"[Date])) then 1 else 0

Screenshot_2.png

View solution in original post

3 REPLIES 3
aashton
Helper V
Helper V

@Ahmedx  Thank you!!

Ahmedx
Super User
Super User

or this

if Date.EndOfMonth([Date]) = Date.EndOfMonth( List.Max(#"Changed Type"[Date])) then 1 else 0

Screenshot_2.png

Ahmedx
Super User
Super User

try this

Screenshot_1.png

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.