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

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.

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 Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.