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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
phamthanhhungks
Regular Visitor

Get max value by category in the period

Dear all,

I'm beginner with Power Bi and would like to get the max value by category in the period (e.g. 01 year). Could you please advise me how to filter this value?

 

Currently, I'm only can find the max value from all datas and not able to filter the value in my range.

 

My data example as below:

CategoryValueDateMax value
A5.521/02/20236.7
A6.721/01/20226.7
A7.821/01/20216.7
B7.021/02/20236.0
B6.021/01/20226.0
B2.521/01/20216.0
C1.221/02/20231.6
C1.621/01/20221.6
C2.521/01/20211.6

 

Many thank for your help.

Best Regards,

Kenny NG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@phamthanhhungks , Try a new column

 

new col =

var _year = year([Date])

return

maxx(filter(Table, [Category] = earlier([Category]) && year([Date]) = _year ) , [Value])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@phamthanhhungks , Try a new column

 

new col =

var _year = year([Date])

return

maxx(filter(Table, [Category] = earlier([Category]) && year([Date]) = _year ) , [Value])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank @amitchandak, this problem resolved.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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