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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ny3rs
New Member

Creating a report on max values from a table

Hello, I have a table which captures monthly mileage values of suer's cars. Thus for each car I have multiple entries. 

I want to create a report in which I can use the date (i.e. year) as well as various filters derived from the car_id to analyze the mileage data. So somehow I need to capture the max value for a given car for the selected period (as in a longer period there could be multiple entries). How should I do this best? Create a new table that has these values on a quaterly or annual basis or work with calculated measures?

This is how my table looks like (the submit_date is irrelevant for me):

ny3rs_0-1639238204958.png

I am very new into PowerBI so sorry for such a basic question.

I'm greateful for every hint!

 

 

1 ACCEPTED SOLUTION
sokg
Solution Supplier
Solution Supplier

Hello @ny3rs 

 

Try this

 

KMValue =
VAR MaxDate = MAX(Table[km_date])
VAR Result =
CALCULATE(
     MAX(Table[km_value]),
     km_date = MaxDate 
)
RETURN
     Result

Hopefully this is what you are looking for!

View solution in original post

3 REPLIES 3
ny3rs
New Member

Thanks @sokg , this helped me a lot!

sokg
Solution Supplier
Solution Supplier

Hi @ny3rs 

 

Glad to help you!!!

sokg
Solution Supplier
Solution Supplier

Hello @ny3rs 

 

Try this

 

KMValue =
VAR MaxDate = MAX(Table[km_date])
VAR Result =
CALCULATE(
     MAX(Table[km_value]),
     km_date = MaxDate 
)
RETURN
     Result

Hopefully this is what you are looking for!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors