cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
knightkblack Frequent Visitor
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
Moderator v-yuezhe-msft
Moderator

Re: Getting group total on each row

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

Re: Getting group total on each row

@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.

Moderator v-yuezhe-msft
Moderator

Re: Getting group total on each row

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

Re: Getting group total on each row

@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
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 170 members 1,935 guests
Please welcome our newest community members: