Forum Discussion
Static Average By Creating Bicket start from 01/07/2020
- 6 years ago
Hi Anonymous ,
Just a little modification on HotChilli's reply(Measure value seems not to be column in table):
AVERAGEVALUE = AVERAGEX ( FILTER ( ALL ( Table ), Table[Bucket] = MIN ( Table[Bucket] ) && Table[LocationID] = MIN ( Table[LocationId] ) ), [Measure] )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Anonymous add following measure
Avg =
CALCULATE ( AVERAGE ( Table[MeasureValue] ), ALLEXCEPT ( Table, Table[LocationId] ) )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Thank You parry2k for the response. I tried the approach but it does not match the excpected output in problem statement. Could you please suggest.
Thanks
- HotChilli6 years ago
Community Champion
A column for the bucket:
Bucket = ROUNDUP(DIVIDE(DAY(TableM[DateKey]), 3), 0)A measure for the average:
AvgForBucketLocation = CALCULATE(AVERAGE(TableM[MeasureValue]), FILTER(ALL(TableM), TableM[Bucket] = MIN(TableM[Bucket]) && TableM[LocationID] = MIN(TableM[LocationId])))There's a mismatch between the data tables in the provided data ( last 2 rows are 3000,3000 in before data and 3000,6000 in the after).
Good luck.