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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yuezhe-msft
Employee
Employee

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft 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.

@knightkblack,

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

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@knightkblack,

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

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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