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
supraja
Regular Visitor

Want to show top 10 states sales

Hello All,

 

I have the sales data of 10+ states ( Sample Fields : states  ,Measures of sales, Rank by states & Ranking states by profit) and i want to show  Total of top 10 states  sales data. 

 

Please help us to show the data as mentioned.

 

 

Regards,

Supra.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1666014940104.png

 

 

Top ten sales: =
CALCULATE (
    [Sales:],
    KEEPFILTERS ( TOPN ( 10, ALL ( Data[State] ), [Sales:], DESC ) )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1666014940104.png

 

 

Top ten sales: =
CALCULATE (
    [Sales:],
    KEEPFILTERS ( TOPN ( 10, ALL ( Data[State] ), [Sales:], DESC ) )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thanks Its Working 😀

Gianluca88
Resolver I
Resolver I

Hi @supraja 

 

try this 

Gianluca88_0-1666014709840.png

So the important is to filter on the visual of your interest like in the image. Please check and let me know.

 

g.

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.