Forum Discussion
Creating Range Buckets using Average per Category ID
- 8 years ago
Hi anil,
That's because the "Allexcept" cleared the context. Please try the formula below or adjust it.
Avg Discount % = CALCULATE ( AVERAGE ( Sample[DISCOUNTPERCENT] ), ALLEXCEPT ( 'Sample', Sample[ID], 'Sample'[Order Date].[Year] ) )Best Regards,
Dale
Please help me with solution. Tried different methods but unable to crack it.
Hi anil,
The [Avg Discount %C] works in my test. Please try it as a measure.
Avg Discount % =
CALCULATE (
AVERAGE ( Sample[DISCOUNTPERCENT] ),
ALLEXCEPT ( 'Sample', Sample[ID] )
)
Best Regards,
Dale
- anil8 years agoHelper III
Thanks Dale for the reply,
If we use the measure the average is constant even if we slice using the date. Which is incorrect.
Eg. If we filter ID say: E50XN and filter year = 2010 the Average remains the same 45.43, where the actual Average is 100.
What I understood is the created measure is not affected by the date slicer.
- anil8 years agoHelper III
Please help me with solution. Tried different methods but unable to crack it.
- v-jiascu-msft8 years agoMicrosoft Employee
Hi anil,
That's because the "Allexcept" cleared the context. Please try the formula below or adjust it.
Avg Discount % = CALCULATE ( AVERAGE ( Sample[DISCOUNTPERCENT] ), ALLEXCEPT ( 'Sample', Sample[ID], 'Sample'[Order Date].[Year] ) )Best Regards,
Dale