Forum Discussion
viralpatel21
5 years agoHelper II
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 = CALCULATE ( SUM ( au_bitgowallets[au_balance] ), USEREL...
- 5 years ago
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-msft
5 years agoCommunity 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