Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear community,
Using a column chart, I have two columns in x-axis and a measure in y-axis.
I would perform a TOP 15 by year, sorted by "Sum_measure".
Pleae could you help me ?
Thank you.
File : Power BI file
Solved! Go to Solution.
I've found the answer to my question here : Multilevel Sorting in Clustered Column Chart of PowerBI | Nested Sorting for BarChart | Tips & Trick
Thank you.
I've found the answer to my question here : Multilevel Sorting in Clustered Column Chart of PowerBI | Nested Sorting for BarChart | Tips & Trick
Thank you.
Hi @JoeMel ,
You can write topn measure like below to achieve your desired output:
Top15CustomerSales =
VAR TopCustomers =
TOPN(
15,
SUMMARIZE(
ALL('Sales'),
'Sales'[Customer],
"TotalSales", SUM('Sales'[Sales])
),
[TotalSales],
DESC
)
RETURN
IF(
CONTAINS(TopCustomers, 'Sales'[Customer], SELECTEDVALUE('Sales'[Customer])),
SUM('Sales'[Sales]),
BLANK()
)
The resultant output will look like below:
I have attached an example pbix file.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |