Forum Discussion
total sales repeating per weekday
- Anonymous1 year ago
Thanks for the reply from Kedar_Pande , danextian and Ritaf1983 , please allow me to provide another insight:
Hi elamad2024 ,Here are the steps you can follow:
1. Create measure.
Measure = AVERAGEX( FILTER(ALL('Table'), WEEKDAY('Table'[Date],2)>=2&&WEEKDAY('Table'[Date],2)<=4),[sales])2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
| Weekday | sales | Tue-Wed |
| mon | 2 035 637 | 2 179 577 |
| tue | 2 162 885 | 2 179 577 |
| wed | 2 205 309 | 2 179 577 |
| thu | 2 170 536 | 2 179 577 |
| fri | 2 106 749 | 2 179 577 |
| sat | 1 172 431 | 2 179 577 |
| sun | 914 075 | 2 179 577 |
I want to create a measure that shows column Tue-Wed
- danextian1 year ago
Super User
How did you come up with 2179577? The average of tue-wed is 2184097
- elamad20241 year agoNew Member
sorry my bad. i meant tue-thu
- danextian1 year ago
Super User
try this:
tuethur = CALCULATE( AVERAGEX ( ADDCOLUMNS ( SUMMARIZE ( FILTER ( 'Fact', 'Fact'[Weekday] IN { "tue", "wed", "thu" } ), 'Fact'[Weekday] ), "@sales", CALCULATE ( SUM ( 'Fact'[sales] ) ) ), [@sales] ), ALLSELECTED() --apply average to all visible rows )
- Ritaf19831 year ago
Super User
Hi elamad2024
If the logic isThen you can create a measure :
Tue_Wed_avg =CALCULATE(AVERAGEX(FILTER('Table', 'Table'[Weekday] in {"Tue","Wed"}),'Table'[Sales]), all('Table'[Weekday]))The pbix is attached.
If it is something else please give a formula of the needed logic.If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- elamad20241 year agoNew Member
thanks
i know that it should work, but it doesn't. i have tried everything. it is very strange