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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to get seasonal average number of transactions

I am trying to make a measure that gives me the average number of transactions on all machines (from a specific date - the  operation date on the machine I am comparing it with) and compare it with specific a machine's performance when it comes to transactions the first 90 days it is in operation (I already have a measure for the last one). I have been able to get the average for all machines their first 90 days of operation. What I am now trying to get is the average number of transactions of all machines from a given operation date. 

 

In example a machine has its first day in operation 12.08.18, then I would like to have a measure that finds the average number of transactions of all machines from 12.08.18 and the next 90 days. In this way I can easily compare the new machine's performance when it comes to transactions the first 90 days with the average of all existing machines in the same period.

 

I have this measure to get the number of transactions the first 90 days of operation: 

Operation date 90+ = CALCULATE([Total number of transactions],DATESINPERIOD(DateTable[Date],FIRSTDATE(dimNode[operation_date]),90,DAY)
 
If you need any more information, let me know. 
 
 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , try something like

averageX(summarize(all(dimNode[Machine]), dimNode[Machine],"_1" , CALCULATE([Total number of transactions],DATESINPERIOD(DateTable[Date],FIRSTDATE(dimNode[operation_date]),90,DAY))),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I did not work as I wanted it to. I will give you some more information @amitchandak.

 

I think I have found a logical way to do it, but there are some things I can't figure out:

I have made a measure that gives the average number of transactions per machine: DIVIDE([total number of transactions], [total number of machines]). 

 

I will show you an example of how it looks when I put this into my report-object and one example of how I want it to be: 

MachineTotal number of transactionsOperation dateTransactions three first monthsAverage number of transactions all machines same period
XX1100003.04.19230230
XX2150004.05.19120120

 

As you can see with the current measure (used in: "Average number of transactions..." the 4th column gives the same value as the 3rd, this is naturally because it gets filtered on machine and operation date. I want it to be filtered on the operation date and 90 days forward from this date. But when I use the operation date-column from the dataset in my formula it only finds the average for that machine. In example with machine XX1 I want the measure to calculate the average total number of transactions in the period 03.04.19-03.07.19. 

 

This is how I want it to look like, maybe I will have to make an own object for the last column: 

MachineTotal number of transactionsTransactions three first monthsAverage number of transactions all machines same period
XX11000230310
XX21500120100

 

Hope this is understandable. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.