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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.