Forum Discussion
Anonymous
3 years agoNot applicable
RANK or INDEX based on Aggregation (Average)
Hi Guys,
I need to create a measure or a column that provides me with RANK of products based on the AVG sales for that product show me only the top 3 products avg sales.
Below the raw data
| Product | Sales | |
| a | 10 | |
| a | 10 | |
| b | 5 | |
| c | 4 | |
| d | 3 | |
| d | 3 | |
| below the average sales | ||
| Product | Average Sales | RANK |
| a | 5 | 1 |
| b | 5 | 2 |
| c | 4 | 3 |
| d | 3 | 4 |
The column RANK is the one I need to create
is that possible?
Thanks a lot
Anonymous
you can try to create measures
avg = AVERAGE('Table'[Sales]) Measure = RANKX(ALL('Table'[Product]),'Table'[avg],,DESC)Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
2 Replies
- ryan_mayuSuper User
Anonymous
you can try to create measures
avg = AVERAGE('Table'[Sales]) Measure = RANKX(ALL('Table'[Product]),'Table'[avg],,DESC) - Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.