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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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])

Follow on LinkedIn
@ 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])

Follow on LinkedIn
@ 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.