Forum Discussion
mediumlevel2024
2 years agoFrequent Visitor
Price Average per selected TopN
Hello everyone, I currently have the problem that I need the average price per selected TopN. This results in price duplication and the average does not recognize that the individual values should b...
- 2 years ago
Hi,
Run the TopN function on some unique column.
ØN price =VAR SelectedN = SELECTEDVALUE('Average N'[Average N])RETURNCALCULATE(AVERAGE(table[price]),TOPN(SelectedN,table,table[Article ID],ASC))
Rupak_bi
Super User
2 years agoHi,
Run the TopN function on some unique column.
ØN price =
VAR SelectedN = SELECTEDVALUE('Average N'[Average N])
RETURN
CALCULATE(
AVERAGE(table[price]),
TOPN(
SelectedN,
table,
table[Article ID],
ASC
)
)
mediumlevel2024
2 years agoFrequent Visitor
Hello, this tip was very helpful. I grouped the prices according to the article number and then inserted an index. The index is now used in my measure for clear assignment.
Many thanks
- Rupak_bi2 years ago
Super User
you are welcome