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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nesselman
Helper I
Helper I

Top 3 Sales Rep By Week - Extracting the Line Data in a Card (Dynamic Podium)

Trying to create a little (fun) winners podium that can be filled in dynamically and I'm not figuring out how to pull out the top 3 from the table.

 

So for any span of time, I want to know the top Rep with highest sales per week.  Then the top three Weeks.

 

I want to pull out the Rep Name, Week Start that it happened and the Sales amount for that Rep that Week.

 

Thoughts?

 

top3_podium.PNG

2 ACCEPTED SOLUTIONS
v-easonf-msft
Community Support
Community Support

Hi, @nesselman 

You can  try steps as below:

1.Add a calculated column 'WeekStart(Mon)' in table 'SalesTable'

WeekStart(Mon) = LOOKUPVALUE(DateTable[WeekStart(Mon)],DateTable[Date],SalesTable[Date])

90.png

2.Add a calculated table 

New Table = SUMMARIZE(SalesTable,SalesTable[WeekStart(Mon)],RepTable[KnownAs],"sales",SUM(SalesTable[Sales]))

3.Create  calculated columns 'rank' and 'value' as below:

Rank = RANKX('New Table','New Table'[sales]) 
Value = 'New Table'[KnownAs]&"   ("&FORMAT('New Table'[WeekStart(Mon)],"d-mmm")&")  $"&'New Table'[sales]

4.Drag the field 'value' into the card visual , and drag the field 'rank' into the visual filter pane to filter the data

92.png

Please check my sample file for more details.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

nesselman
Helper I
Helper I

Thank you.  This was very helpful (and taught me another technique).  Now I'm working on filtering that newTable down to use a Year selected by a Slicer.  Appreciate your solution.

View solution in original post

2 REPLIES 2
nesselman
Helper I
Helper I

Thank you.  This was very helpful (and taught me another technique).  Now I'm working on filtering that newTable down to use a Year selected by a Slicer.  Appreciate your solution.

v-easonf-msft
Community Support
Community Support

Hi, @nesselman 

You can  try steps as below:

1.Add a calculated column 'WeekStart(Mon)' in table 'SalesTable'

WeekStart(Mon) = LOOKUPVALUE(DateTable[WeekStart(Mon)],DateTable[Date],SalesTable[Date])

90.png

2.Add a calculated table 

New Table = SUMMARIZE(SalesTable,SalesTable[WeekStart(Mon)],RepTable[KnownAs],"sales",SUM(SalesTable[Sales]))

3.Create  calculated columns 'rank' and 'value' as below:

Rank = RANKX('New Table','New Table'[sales]) 
Value = 'New Table'[KnownAs]&"   ("&FORMAT('New Table'[WeekStart(Mon)],"d-mmm")&")  $"&'New Table'[sales]

4.Drag the field 'value' into the card visual , and drag the field 'rank' into the visual filter pane to filter the data

92.png

Please check my sample file for more details.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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