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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
HR30385
Regular Visitor

Retrieve Max of Measure (PBI example file included)

Hi, 

 

I need to retrieve the max value for my measure (revenue_cost_ratio) depending on what is shown in my table. The filter context must be used to retrieve the max value. Here is the example:

 

Here my max measure for revenue_cost_ratio should return 239%:

HR30385_2-1725883004747.png

 


When filtered for "Summer" my max measure should return 184%:

HR30385_1-1725882987692.png

 

 

Here is the power bi file: https://easyupload.io/w2824z

 

Any help is greatly appreciated!

 

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Max revenue_cost_ratio = 
MAXX(
    SUMMARIZE( fact_sales, dim_manufacturer[Manufacturer], dim_category[category] ),
    [revenue_cost_ratio]
)

ThxAlot_0-1725885758868.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

Max revenue_cost_ratio = 
MAXX(
    SUMMARIZE( fact_sales, dim_manufacturer[Manufacturer], dim_category[category] ),
    [revenue_cost_ratio]
)

ThxAlot_0-1725885758868.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Selva-Salimi
Super User
Super User

Hi @HR30385 

 

you can write a measure as follows:

 

measure max_percent := var tbl1= summarize (table, [category], [manufacturer] ,'rev' ,[(revenue_cost_ratio])

return maxx(tbl1, rev)

 

If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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