Forum Discussion

Goncalo_7's avatar
Goncalo_7
Frequent Visitor
4 years ago

Average Minimum per Month

Hello guys, 

 

Please help with the following: 

 

I have 2 tables, transactions and budgets

Transactions:

transactionIDUserIDExecutionDateBalanceAmount
000025776534447/20/2020 6:31:00 PM100020
000029996545648/20/2020 6:31:00 PM20030
00042596545649/20/2020 6:31:00 PM17030

 


And budgets:

BudgetIDUserIDBudgetDateTotalIncome
734626534447/20/20203000
734636545647/20/20204000
734646545647/21/20204000
734656534447/21/20203000

 

Considerations about budgets:

Everyday 1 entry with a new budget is created per user, for reference, when multiple budgets exist on a given time frame for the same user, the last one is to be used if not a more specific datapoint exists. (last of the month, last of the week,last of the given period)

What i'm trying to achieve is the following:
1 - The average minimum balance per month. So every Month, each user has a minimum balance, i need to calculate the average of that minimum balance amoung all users, per month. (should be a value per month) 

2 - have the same average calulation but instead of absolute value, the percentage of the users Income.  (should be a value % per month) 

 

Can you please help me with this request?

 

Thank you

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Goncalo_7 So perhaps something like:

    Measure = AVERAGEX(SUMMARIZE('Transactions',[UserID],"Min",MIN([Balance]),[Min])