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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Wedding55
Helper II
Helper II

Filtering Max Date with AllEXECPT in M Language

Hello everyone,

I have the following Dax formula to create a new column in the Power BI Report.. However, I would like to create this step in the Query Editor. But im not sure how to do this. I created a normal max Funktion but i need the ALLEEXCEPT function for "Date_per month" in the M Language solution.

 

Dax Formula:  Max_Date = CALCULATE(MAX(Date[LastDate]), ALLEXCEPT(Date, Date[Date_per_month]))

 
M Language: List.Max(#"Changed Type2"[LastDate]) 
 
Do you have any ideas how to do this?
 
Best Regards
 
1 ACCEPTED SOLUTION
Wedding55
Helper II
Helper II

Hey, thanks for your answer. I solved it with ja group by function and joined the data later:)

View solution in original post

3 REPLIES 3
Wedding55
Helper II
Helper II

Hey, thanks for your answer. I solved it with ja group by function and joined the data later:)

Anonymous
Not applicable

Hi,

Thanks for the solution @BITomS  provided, and i want to offer some more information for user to refet to.

hello @Wedding55  , you can create a custom column and try the following code.

let a=[Date_per_month]
in List.Max(Table.SelectRows(#"Changed Type2",each[Date_per_month]=a)[LastDate])

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BITomS
Continued Contributor
Continued Contributor

Hi @Wedding55 ,

 

It sounds like the Group By function could help here (available in the Transform tab)?

 

Group By Date_per_month and use the MAX aggregation?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.