top x values column

Forum home » Delegate support and help forum » Microsoft Power BI training and help » Top X values from column per day

Top X values from column per day

resolvedResolved · Medium Priority · Version 2016

Andy has attended:
Introduction to Management course

Top X values from column per day

Hi all,

Hoping you might be able to help here. Seems relatively simple, but struggling to get the desired result.

I have the below table and what I'd like to produce is a chart showing the sum of the top 2 classes per day. The top 2 on any day could be between any class.

So the first would be 10/06/2018; 18,391(a+b), 11/06/2018; 16,317 (a+c) and so on.

For some reason using a Top N visual filter won't work.

Thanks in advance
Andy

Date Class Amount
10/06/2018 a 503
10/06/2018 b 895
10/06/2018 c 7,358
10/06/2018 d 750
10/06/2018 e 596
11/06/2018 a 8,085
11/06/2018 b 6,617
11/06/2018 c 4,339
11/06/2018 d 1,609
11/06/2018 e 4,362
12/06/2018 a 1,072
12/06/2018 b 3,293
12/06/2018 c 4,213
12/06/2018 d 1,083
12/06/2018 e 9,347

RE: Top X values from column per day

Hi Andy,

Thank you for the forum question.

No it is not a simple thing you want.

When you filter it using topn filter Power BI will just find the two classes with highest amount and display the same two classes each day. If you want both to filter topn 2 and on days you need to write DAX.

I found the solution. Please have a look at the link below.

https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/


Please let me know if it does not make sense.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: Top X values from column per day

Hi Jens,
The first option on the link has worked for me. Appreciate your help.
Thanks
Andy

 

Training courses

 

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Power BI tip:

Create Interactive Dashboards

Build interactive dashboards by leveraging features like slicers, drill-through, and bookmarks. Slicers allow users to filter data dynamically, while drill-through enables detailed exploration of specific data points. Bookmarks help you save the current view, making it easy to switch between different states of your report.

View all Power BI hints and tips


Server loaded in 0.07 secs.