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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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