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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Show Max value for each item in a gallery

Hi,

 

 I am trying to show the max weight recorded for each exercise in a gallery.

I can successfully filter by specific numbers, but would like to use the Max function instead.

My query is as follows:

Filter(SortByColumns(
WorkoutLogs,"cr503_weightkg",
SortOrder.Descending
),'Weight (kg)'=84)

 

thanks in advance

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Thanks for the above,

 

 Unfortunately I need this for a PowerApps Gallery, so Power fx please.

I'm unable to use a DAX measure.

 

tried converting it.

 

ClearCollect(
MaxWeightsByExercise,
ForAll(
Distinct(WorkoutLogs, 'cr503_exercise'),
LookUp(
WorkoutLogs,
'cr503_exercise' = Result,
'Weight (kg)' = Max(Filter(WorkoutLogs, 'cr503_exercise' = Result), 'Weight (kg)')
)
)
)

 

sorry if it doesn't help you.

 

rubayatyasmin_0-1689517080227.png 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


rubayatyasmin
Super User
Super User

Hi, @Syndicate_Admin 

 

see if this works. 

 

Max Weight =
CALCULATE (
MAX ( WorkoutLogs[Weight (kg)] ),
FILTER (
ALL ( WorkoutLogs[Exercise] ),
WorkoutLogs[Exercise] = MAX ( WorkoutLogs[Exercise] )
)
)

 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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