Forum Discussion
stefanot
3 years agoFrequent Visitor
Averageif based con current line
Hallo, I've found similar questions to mine in the forum, but it looks like none of them is really what I'm looking for In PowerPivot/DAX I want to create a measure that represents an averageif o...
- 3 years ago
Hi stefanot ,
Please try:
AverageNumberofSALES = CALCULATE(AVERAGE('Table'[SALES]),ALLEXCEPT('Table','Table'[Product]))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jianboli-msft
3 years agoCommunity Support
Hi stefanot ,
Please try:
AverageNumberofSALES = CALCULATE(AVERAGE('Table'[SALES]),ALLEXCEPT('Table','Table'[Product]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- stefanot3 years agoFrequent Visitor
This works perfectly, thanks!
let me take the chance for an additional question though:
imagine you have an additional variable of status:
PRODUCTSTATUSSALES
DRINK SOLD 1 DRINK PROPOSED 3 FOOD PROPOSED 4 how can you get the average if that changes depending on whether you filter by status (eg the average of only sold drinks would become 1)?