cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cptcherry
New Member

The average of the two highest per group

HI there,

 

Here is my data:

 

cptcherry_1-1643067929354.png

 

Once I sort out the grouping situation (to group by datetime within 2 minutes grouping) (see: https://community.powerbi.com/t5/Power-Query/Grouping-date-times-that-are-within-a-minute-of-the-val... )

For each group, I'd want to average the two highest values from the strength column.

How can I do that? Is it best done in Power Query, or in Dax?

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

1 REPLY 1
AlexisOlson
Super User
Super User

My answer here may be useful:
https://community.powerbi.com/t5/Desktop/Filter-out-top-3-rows-based-on-same-timestamp/m-p/2159050

 

The key is using Group By along with Table.MaxN.

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!