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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
BSPAVAN86
Frequent Visitor

TOP N and Others in LIVE Connection Type

Hi ,

 

Can anyone advice how to achieve TOP N + others in Power BI with Live Connection (Don’t have option to create calculated columns or Calculated table both are greyed out). Something live below

 

Sample123.jpg

Sample1234.jpg

 

1 ACCEPTED SOLUTION
v-xiaosun-msft
Community Support
Community Support

Hi @BSPAVAN86 ,

 

You can create a measure to get your expected output. I made a sample and please follow these steps.

Sample data:

vxiaosunmsft_0-1669776396189.png

Create a measure. (Here, my others is "LL Road Frame".)

Measure =
VAR _top3 =
    TOPN (
        3,
        ALL ( 'Product'[Model Name] ),
        CALCULATE ( SUM ( 'Product'[Dealer Price] ) ), DESC
    )
RETURN
    IF (
        HASONEVALUE ( 'Product'[Model Name] ),
        SWITCH (
            TRUE (),
            SELECTEDVALUE ( 'Product'[Model Name] ) = "LL Road Frame", SUM ( 'Product'[Dealer Price] ),
            CALCULATE ( SUM ( 'Product'[Dealer Price] ), KEEPFILTERS ( _top3 ) )
        )
    )

Final output:

vxiaosunmsft_1-1669776474019.png

 

Best Regards,
Community Support Team _ xiaosun

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

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

Hi @BSPAVAN86 ,

 

You can create a measure to get your expected output. I made a sample and please follow these steps.

Sample data:

vxiaosunmsft_0-1669776396189.png

Create a measure. (Here, my others is "LL Road Frame".)

Measure =
VAR _top3 =
    TOPN (
        3,
        ALL ( 'Product'[Model Name] ),
        CALCULATE ( SUM ( 'Product'[Dealer Price] ) ), DESC
    )
RETURN
    IF (
        HASONEVALUE ( 'Product'[Model Name] ),
        SWITCH (
            TRUE (),
            SELECTEDVALUE ( 'Product'[Model Name] ) = "LL Road Frame", SUM ( 'Product'[Dealer Price] ),
            CALCULATE ( SUM ( 'Product'[Dealer Price] ), KEEPFILTERS ( _top3 ) )
        )
    )

Final output:

vxiaosunmsft_1-1669776474019.png

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@BSPAVAN86 , I doubt that, in month the approaches you need a table or column, you need get it created in source

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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