cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors