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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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])

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])

Thank @amitchandak, this problem resolved.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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