Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
pbi_newuser2023
Frequent Visitor

Top 10 customer and its respective M-1 and M-2 data

Hi, how to show the Top 10 clients with sales of current month, previous month and last 2 months? For example, when April is selected on the Month slicer, the table shows top 10 clients based on sales amount in April. The table also shows the sales amount for previous month and past 2 months for the current top 10 clients. 

 

pbi_newuser2023_0-1685087911494.png

Here is the sample data.

Top 10 Client Sales Amount Month
A                     32April
B                     57April
D                     85April
E                     96April
F                     93April
G                     84April
H                     53April
I                       6April
J                     80April
K                     41April
A                     88March
B                     41March
D                     71March
E                     89March
F                     72March
G                     65March
H                     93March
I                     38March
J                     40March
K                     41March
A                     51February
B                     13February
D                     70February
E                     62February
F                     28February
G                     52February
H                     67February
I                       3February
J                     70February
K                     16February

 

1 ACCEPTED SOLUTION

3M.pbix

 

ThxAlot_0-1685166913833.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

The question itself is easy enough; but I'd not bother to spend more time making mock-up data than authoring the solution. Paste some copiable mock-up data.



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



Hi @ThxAlot , I have added the sample data in my post now. Thanks.

3M.pbix

 

ThxAlot_0-1685166913833.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



Hi @ThxAlot , thank you for the solution! It works. How about bottom 10? Can you show me how to do it? Thanks a lot! 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.