Forum Discussion
Comparing SKU average with Category Average
- 6 years ago
Anonymous try this measure, it will get you what you are looking for.
Would appreciate Kudos 🙂 if my solution helped.
AVG_CAT_LOW = VAR __low = MAX ( searchspring[Category Low] ) RETURN CALCULATE( [AVG_SKU], ALL ( searchspring[SKU], searchspring[Category Low]), searchspring[Category Low] = __low )
Hi Anonymous ,
Try these:
Category Average =
CALCULATE (
AVERAGE ( 'searchspring'[Value] ),
ALLEXCEPT ( 'searchspring', 'searchspring'[Category High] )
)
SKU Average =
CALCULATE (
AVERAGE ( 'searchspring'[Value] ),
ALLEXCEPT (
'searchspring',
'searchspring'[Category High],
'searchspring'[Category Low]
)
)
Thank you but in your calculation the only difference is the sum function and divide changed for average which does not help at all. I don't need to calculate average based on the count of rows but on the number of items.
- danextian6 years ago
Super User
Is Item a separate column from SKU/High Level Category? And the average is based on the sum of each item divided by the number of unique items like below?
Item Value Row Count Item10 790 20 Item19 40 5 Item02 42 16 Average 290.67 - parry2k6 years ago
Super User
Anonymous try this measure, it will get you what you are looking for.
Would appreciate Kudos 🙂 if my solution helped.
AVG_CAT_LOW = VAR __low = MAX ( searchspring[Category Low] ) RETURN CALCULATE( [AVG_SKU], ALL ( searchspring[SKU], searchspring[Category Low]), searchspring[Category Low] = __low )- Anonymous6 years agoNot applicable
Thank you, works flawless! parry2k
- Anonymous6 years agoNot applicable
If I understand you correctly i think that is separate.
Average is calculate by the sum of value for item divided by column with number of items