Forum Discussion
Calculate Average Balance
Hello World
I am trying to calculate the average balance using 2 measure. But i am not sure how?
my 2 measure are
Total Balance =
hope this makes sense 🙂
thanks
viral
Hi viralpatel21 ,
The average balance is equal to the total balance divided by the number of wallets.
Average Balance= var Total_Balance = CALCULATE ( SUM ( au_bitgowallets[au_balance] ), USERELATIONSHIP ( au_bitgowallets[CreatedDate], FeeDate[Date] ) ) var Number_balance = CALCULATE ( DISTINCTCOUNT ( au_bitgowallets[au_bitgowalletid] ), FILTER ( au_bitgowallets, au_bitgowallets[au_balance] > 0 ), USERELATIONSHIP ( FeeDate[Date], au_bitgowallets[CreatedDate] ) ) RETURN Total_Balance/Number_balanceYou can substitute the measure into pbix to see if the final result is accurate.
Wish it is helpful for you!
Best Regards
Lucien
3 Replies
- amitchandakSuper User
Is it not a new measure like ?
divide([Total Balance],[Number of Wallet with balance])
- v-luwang-msftCommunity Support
Hi viralpatel21 ,
The average balance is equal to the total balance divided by the number of wallets.
Average Balance= var Total_Balance = CALCULATE ( SUM ( au_bitgowallets[au_balance] ), USERELATIONSHIP ( au_bitgowallets[CreatedDate], FeeDate[Date] ) ) var Number_balance = CALCULATE ( DISTINCTCOUNT ( au_bitgowallets[au_bitgowalletid] ), FILTER ( au_bitgowallets, au_bitgowallets[au_balance] > 0 ), USERELATIONSHIP ( FeeDate[Date], au_bitgowallets[CreatedDate] ) ) RETURN Total_Balance/Number_balanceYou can substitute the measure into pbix to see if the final result is accurate.
Wish it is helpful for you!
Best Regards
Lucien
- v-luwang-msftCommunity Support
Hi viralpatel21 ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.
Best Regards
Lucien