Forum Discussion

clarkey1988's avatar
clarkey1988
Helper II
5 years ago

Creating a new table from a current table

Hi, I'm wondering if anyone can help.

 

I have a table in my BI desktop called Trip Detail. I'm trying to create a measure that calulates the average number of trucks used each week in 2021.

 

The overall goal is to use this measure to be divided by the average revenue per week (which I already have) to calculate the average revenue/truck.

 

I believe I need to create a new table off my current table like I would do in excel below. However, I can't seem to get the results I'm looking for.

 

Any help will be much appreciated!

 

 

6 Replies

  • clarkey1988 you just need measures, no new table:

     

    Avg Revenue = AVERAGE ( Table[Revenue] )
    
    Avg Truck = AVERAGE ( Table[Truck Count] )
    
    Avg Rev Per Truck = DIVIDE ( [Ave Revenue], [Avg Truck] )

     

    if this doesn't work, It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.

    • clarkey1988's avatar
      clarkey1988
      Helper II

      Hi parry2k 

       

      I don't think it's as simple as that. Each truck has a unique truck number.

       

      Currently I'm calculating the distinct count of trucks we've used in 2021 at one point. I need to calculate the average distinct count of trucks for each week in 2021.

       

      Week 2 we used 617

      Week 4 we used 637

      Week 5 we used 642

      Week 6 we used 641

       

      For an average of 634 trucks/week in 2021

      • clarkey1988's avatar
        clarkey1988
        Helper II
        Distinct Count of Trucks/Week = (CALCULATE(COUNT(DimTractor[TractorAK]),FILTER('Trip Detail','Trip Detail'[Year]=2021)))
         
        Forgot to add my current measure
  • clarkey1988 nothing is simple until you see the data and understand the problem. It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.

    • clarkey1988's avatar
      clarkey1988
      Helper II

      Hi parry2k I figured it out by creating a new table and then averaging the number of trucks each week from that. Thank you for reaching out and helping!