Forum Discussion
Average Minimum per Month
Hello guys,
Please help with the following:
I have 2 tables, transactions and budgets
Transactions:
| transactionID | UserID | ExecutionDate | Balance | Amount |
| 00002577 | 653444 | 7/20/2020 6:31:00 PM | 1000 | 20 |
| 00002999 | 654564 | 8/20/2020 6:31:00 PM | 200 | 30 |
| 0004259 | 654564 | 9/20/2020 6:31:00 PM | 170 | 30 |
And budgets:
| BudgetID | UserID | BudgetDate | TotalIncome |
| 73462 | 653444 | 7/20/2020 | 3000 |
| 73463 | 654564 | 7/20/2020 | 4000 |
| 73464 | 654564 | 7/21/2020 | 4000 |
| 73465 | 653444 | 7/21/2020 | 3000 |
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_DecklerCommunity Champion
Goncalo_7 So perhaps something like:
Measure = AVERAGEX(SUMMARIZE('Transactions',[UserID],"Min",MIN([Balance]),[Min])