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
Erica_Maidana
Helper I
Helper I

Dynamic Top N and Others by grand total

Hi!: Maybe someone can help me here. I'm driving crazy trying to get this chart in Power Bi. I need to get show first 25 top resellers by year and ranking the first 25 by grand total (sum of 2016+2017+2018) and at the end another row with sum of "Others" as I show here in this graphic. The problem is that it has to change depends on what Geography the user selects and if there is no selection it has to show Worlwide calculation. I'm pretty new in Power Bi so I don't know how to start here. Could you please help here??? Thanks in advanced!!!

top25.png

 

 

 

1 ACCEPTED SOLUTION

Hi @Erica_Maidana,

 

You can try to use below measure as filter tag if it suitable for your requirement:

Tag =
VAR list =
    SELECTCOLUMNS (
        TOPN (
            25,
            SUMMARIZE (
                ALLSELECTED ( Data ),
                [ResellerGlobalName],
                "Billing", [Billings Top & Other]
            ),
            [Billing], DESC
        ),
        "ResellerGlobalName", [ResellerGlobalName]
    )
RETURN
    IF ( SELECTEDVALUE ( Data[ResellerGlobalName] ) IN list, "Y", "N" )

6.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Erica_Maidana,

 

I think you can try to write a measure as filter to apply on visual level filter to display top 25 result.

Can you please share some sample data with table structure to help us coding formula.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi!/ thank you for answering. 

 

I am uploading the file that I am using. as you can see I could create everything and it works fine if I select only one year. If I want to see 2 years and add maybe a YOY I know that it is going to break. Any idea where the is the issue here?

 

https://www.dropbox.com/sh/k780fnn82a3y3fz/AACPtx9Id_RsysMiYOLw4rZka?dl=0

 

Hi @Erica_Maidana,

 

You can try to use below measure as filter tag if it suitable for your requirement:

Tag =
VAR list =
    SELECTCOLUMNS (
        TOPN (
            25,
            SUMMARIZE (
                ALLSELECTED ( Data ),
                [ResellerGlobalName],
                "Billing", [Billings Top & Other]
            ),
            [Billing], DESC
        ),
        "ResellerGlobalName", [ResellerGlobalName]
    )
RETURN
    IF ( SELECTEDVALUE ( Data[ResellerGlobalName] ) IN list, "Y", "N" )

6.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you I will try!

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.