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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jhenscheid
Frequent Visitor

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

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

I would think something along the lines of:

 

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

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

I would think something along the lines of:

 

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

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.