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
Newbie22
Resolver I
Resolver I

Calculated measure to get the vendors with most overall appearances in the top 3

Hi All,

 

Hope everyone's good.

 

I need to create a measure to get the top 3 vendors with most appearances in each month in the "top highest sum amount by month". I need a view where I can monitor these vendors that are consistent in the top 3 each month. This is going to be helpful so I can flag these vendors and report.

 

I have 4 columns:

Date column: January to April 2023

Vendor name column: A, B, C, D, E

Amount column

Discount column: Yes or No (Choose Yes only)

Newbie22_0-1685972537924.png

 

FYI- Please filter Discount column with "Yes" and then refer to the amount.

 

Perhaps something like this: 

Newbie22_0-1685973611770.png

 

Here's the sample pbix if you need it. Thank you

 Sample PBI - Google Drive

1 ACCEPTED SOLUTION

 

 

Top 3 = 
var a = SUMMARIZE(Discount,[Vendor name],"am",sum(Discount[Amount]))
return if(hasonevalue(Discount[Vendor name]),BLANK(),CONCATENATEX(topn(3,a,[am],DESC),[Vendor name],",",[am],DESC))

 

 

lbendlin_1-1686070103991.png

 

see attached

View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

what's the expected output based on the sample data you provided?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




 

 

Top 3 = 
var a = SUMMARIZE(Discount,[Vendor name],"am",sum(Discount[Amount]))
return if(hasonevalue(Discount[Vendor name]),BLANK(),CONCATENATEX(topn(3,a,[am],DESC),[Vendor name],",",[am],DESC))

 

 

lbendlin_1-1686070103991.png

 

see attached

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.