Forum Discussion

jhenscheid's avatar
jhenscheid
Frequent Visitor
9 years ago
Solved

Average Transactions per Day

For some reason I am struggling to figure this out.  By doing some searches, I have tried solutions using Group By, and by creating a measure column and adding a column, but for some reason, I am not able to get the solution I am expecting.

 

I have a large table each row contains a trailer along with a transaction date.  The transaction date represents when that trailer either entered or left a geofence.  I also have information on which location (city) and LoadGroup that the trailer is for.  I can slice the data by those items, that is not my concern.  

 

So, I have multiple entries per date, and I can have the same trailer on different dates.  

 

What I want to determine is the average transactions per date.  I can calculate a count per date, but for some reason when I go to calculate the average, that's where I hit a roadblock.

 

Here is a sample of the data;

 

LoadIDLoadGroupCityTrailerTransaction Date
65837536INBOUNDCity A1651436/1/2017
66256425INBOUNDCity A2550616/1/2017
66259429INBOUNDCity B2750846/1/2017
66377282INBOUNDCity B2550136/1/2017
66725986TRANSFERCity B2450516/1/2017
66726004TRANSFERCity B2550136/1/2017
66596336OUTBOUND BILLABLECity C2650776/1/2017
66596606OUTBOUND BILLABLECity C1450516/1/2017
66735849TRANSFERCity B1652186/2/2017
66735964TRANSFERCity B1150096/2/2017
66765536TRANSFERCity C2651106/2/2017
66768794TRANSFERCity C1650466/2/2017
66769410TRANSFERCity C1150056/2/2017
66372780INBOUNDCity D2820026/2/2017
66771959OUTBOUND BILLABLECity A1652586/3/2017
66259485INBOUNDCity B1351936/3/2017
66377668INBOUNDCity B2550186/3/2017
66771843OUTBOUND BILLABLECity B2450116/3/2017
66771850OUTBOUND BILLABLECity B2740126/3/2017
66771957OUTBOUND BILLABLECity C1450176/3/2017
66774087TRANSFERCity D1351276/3/2017
66505986INBOUNDCity B1351526/4/2017
66545207INBOUNDCity B2450536/4/2017
66590496OUTBOUND BILLABLECity D1351516/4/2017
66618324INBOUNDCity D2750696/4/2017
66619119OUTBOUND BILLABLECity E2350176/4/2017

 

 Any help would be appreciated!

 

Thanks,

Jeff

  • I would think something along the lines of:

     

    Average = COUNTROWS(Table) / DISTINCTCOUNT(Table[Transaction Date])

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    I would think something along the lines of:

     

    Average = COUNTROWS(Table) / DISTINCTCOUNT(Table[Transaction Date])