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
Anonymous
Not applicable

How to find the name of the largest value (by most counts) when selecting filter?

Hi all,

 

I am working on a dataset and I would like to create a measure (or multiple measures) to identify the top counts for job title when I filter by countries.

 

Data set example for identifying top job titles.JPG

 

How do I transform the data above into the example below? When I click on the country, I want to automatically show the best performing job titles? 

 

Example Result 2.JPGExample Result.JPG

Thank you!

 

Ashley

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI,

you can define a basic measure as

# Rows = COUNTROWS('Table')
and then build your main measure:
Top Performing Job Title = CALCULATE(MAX('Table'[Job Title]),TOPN(1, 'Table', [# Rows]))
 
Regards
Lorenzo

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI,

you can define a basic measure as

# Rows = COUNTROWS('Table')
and then build your main measure:
Top Performing Job Title = CALCULATE(MAX('Table'[Job Title]),TOPN(1, 'Table', [# Rows]))
 
Regards
Lorenzo
Anonymous
Not applicable

Hi supergimi,

 

Thank you for your swift response! It seems like the measure wouldn't change according to the filter value. Can I ask for your advice on this?

 

Thanks again! 

 

Ashley

Anonymous
Not applicable

Hi,

in my sample .pbix, built on data you show in the first post, the measure work with filter.

If you are testing your model with the same data, keep attention on the fact that for France, you have 3 occurrencies for Directors, CIO and IT Manager and not a real TOP1 job title. So I try changing the source data a little.

 

powerbi_jobTitles_GB.png      

 

 

 

powerbi_jobTitles_FR.png

 

 

Regards

Lorenzo

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.