cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
swathi1997
Helper I
Helper I

filter the brand based on sales

i need to create measure to filter the category based on percentage is greater 10. after filter the category , i need to take top 2 category 2 of filter brands, based on other measure

swathi1997_0-1656587028712.png

Filter category that has greater 10 percentage

swathi1997_1-1656587224877.png

rank top 2 filtered category 2 based on  loss

swathi1997_2-1656587309639.png

 

Kindly help to create to filter category 2 and need dax of top 2 for filtered category based on loss.

 

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

Hi @swathi1997 ,

 

Please try this measure.

Top 2 Loss Gv = 
CALCULATE (
    [Loss gv],
    KEEPFILTERS (
        TOPN (
            5,
            ALLSELECTED ( 'Table'[Category 1], 'Table'[Category 2] ),
            [Loss gv], DESC
        )
    )
)

vcgaomsft_0-1656927331136.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @swathi1997 ,

 

Please try this measure.

Top 2 Loss Gv = 
CALCULATE (
    [Loss gv],
    KEEPFILTERS (
        TOPN (
            5,
            ALLSELECTED ( 'Table'[Category 1], 'Table'[Category 2] ),
            [Loss gv], DESC
        )
    )
)

vcgaomsft_0-1656927331136.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors