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
dyee4613
Helper I
Helper I

Summarizing Data Issue

The goal of this report is to analyze milage data.  To do this, I need to calculate how many miles they have driven since the last time data was entered.  To do this, I created three measures. 

 

Start Date - This is the first date in my data set.  
Start Date =  FIRSTDATE(ALL(Combined[Date])) 
End Date = This is the day before the selected time period.
End Date = MIN(Combined[Date])-1 
Last Odom Reading = This is the highest odometer reading right before the selected date range.  It should always be one day before the last entry.  
Last Odom Reading = CALCULATE(MAX(Combined[Odometer]),DATESBETWEEN(Combined[Date],[Start Date],[End Date]))
The issue I'm running into is my measure doesn't work when there are multiple entries on the same day.

However, when I summarize the entries using sum or max it works perfectly
 
As a temporary measure, I have used the MAX field so the odometer readings remain consistent however I would like to be able to show all the fields of my data because when there are multiple fuelings on the same day something fishy is usually occurring. 
3 REPLIES 3
dyee4613
Helper I
Helper I

Here are the pictures: it kept giving me an error when I initially made the thread

Summarized DataSummarized DataUnsummarized DataUnsummarized Data

Hi @dyee4613 ,

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @dyee4613 ,

I created a measure that you can have a try.

 

Measure = CALCULATE(SUM('Table'[Odometer]), FILTER('Table','Table'[Date] >= MIN('Table'[Date]) && 'Table'[Date] < MAX('Table'[Date])-1))

3.PNG

 

If it is not what you want, please share your expected results.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Top Kudoed Authors