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
knightkblack
Frequent Visitor

Getting group total on each row

Hi All

 

I've got a table that has trucks and the number of miles they ran. I'm trying to get a distinct count of trucks that ran over a certain number of miles during any given week. The issue I'm running into is that the table has each truck multiple times for each load they carried. An individual load is not going to be over that parameter I set, but the summed total for the week might be. 

Summing by Truck.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The bolded lines are the total for that truck number for the week, which Power BI automatically creates. Is there anyway I can get the total miles for a week calculated and then repeated down the column. I think if I have that I can then get a distinct count of the trucks that ran over X amount of miles.

 

Thanks

4 REPLIES 4
Anonymous
Not applicable

@knightkblack,

Please check if DAX in attached PBIX file returns your expected result, if not, please post expected result based on above sapmple data.

Regards,
Lydia

@Anonymous This is great and worked perfect. Thank you! 

 

One more step. I also have driver type I would like to filter on. So there are three different types A, B, and C each with different mileage parameters associated with them. For example, Driver Type A I'd like to see how many drove over 2000 miles. Driver B though I would like to see how many drover over 2500 miles and over 2300 for Driver type C. I have the driver type info associated with each truck as another column in my table, just struggling to figure out how to add additional filters to the measure you provided so that I can get each number by itself.

Anonymous
Not applicable

@knightkblack,

Please share sample data of your original table and post expected resutl here.

Regards,
Lydia

Anonymous
Not applicable

@knightkblack,

Please share sample data of your original table and post expected resutl here.

Regards,
Lydia

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