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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors