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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
manuelbanza
Frequent Visitor

Average of Min

Hi,

 

I have this dataset for example:

HotelDayPrice
A1 €   150.00
A1 €   130.00
A1 €   200.00
B1 €   150.00
C1 €   145.00
C1 €   135.00
D1 €   200.00
D1 €   190.00
A2 €   190.00
B2 €   160.00
B2 €   120.00
C2 €   120.00
C2 €   178.00
D2 €   170.00


So for each day I have Hotels with different prices (different rooms). What I want to do is to calculate the average by hotel of their lowest rate. First calculate the MIN value for each hotel by day and then create the average of those days (in this example day 1 and 2. So then I can have a graph like this:


price.PNG

 

 

Or maybe create a column that only return the lowest price for each hotel and the other rows return 0, and then I can create an average of that column excluding zeros.

 

I have tried a lot of calculations but none of them seem to work. Can you help me with this?

 

Thank you!

 

Manuel Banza

1 ACCEPTED SOLUTION
Cesare
Regular Visitor

Try this:

 

AvgOfMin = AVERAGEX(SUMMARIZE(Table1,Table1[Day],"MinPrice",MIN(Table1[Price])),[MinPrice])
 
Note that the price needs to be Numeric.
 
Cesare

View solution in original post

3 REPLIES 3
Cesare
Regular Visitor

Try this:

 

AvgOfMin = AVERAGEX(SUMMARIZE(Table1,Table1[Day],"MinPrice",MIN(Table1[Price])),[MinPrice])
 
Note that the price needs to be Numeric.
 
Cesare

@Cesare Thank you so much it works perfectly!

 

Have a nice weekend.

 

Manuel Banza

hi @Cesare 

 

do you know I can calculate the mode of the min(Lowest price)?

 

thank you,

 

Manuel Banza

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors