Forum Discussion
Anonymous
6 years agoNot applicable
Comparing SKU average with Category Average
Hello, I'm reaching to you because I've encountered some problem I have hard time to solve. Either is really simple and I cannot come up with solution or it's pretty tricky. I want to calculate ...
- 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 )
danextian
Super User
6 years agoHi 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]
)
)
- Anonymous6 years agoNot applicable
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 )