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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.