Forum Discussion
Calculate Average Balance on a given weekday
Hello friends, I am having a time on something so simple.
I have a data set that contains daily balances for each day of the week. I need to report on the average balances on Mondays, average on tuesdays, and so forth.
Here is sample table i am using.
What I need to do is total up the balances on Mondays, then divide by the # of mondays.
For example: 657000000.00+600863.93+593000000.00+630982.96+783000000.00+230574.28+669139444.91+653974727.97=3,357,576,594.05
3,357,576,594.05/5 (there are 5 mondays) = 671,515,318.81
What i believe is happening is it is being averaged by the # of balances in the equation, causing my #s to skew.
3,357,576,594.05/8=419,697,074.26
May I please ask for help in an expression that only counts the # of mondays?
- Anonymous3 years ago
Hi DanoD ,
Please create a new measure:
Measure = VAR _toatl = SUM('Table'[Balance]) VAR _rows_count = COUNTROWS('Table') VAR _result = DIVIDE(_toatl,_rows_count) RETURN _resultcheck the pbix file.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
2 Replies
- Ahmedx
Super User
Share sample pbix file to help you.
- AnonymousNot applicable
Hi DanoD ,
Please create a new measure:
Measure = VAR _toatl = SUM('Table'[Balance]) VAR _rows_count = COUNTROWS('Table') VAR _result = DIVIDE(_toatl,_rows_count) RETURN _resultcheck the pbix file.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum