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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.