cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DerekRadue
New Member

Ranking - masking non selected Items

Hi

 

I have data similar to the table below

 KPI 1KPI 2KPI 3
Store A  30030522
Store B10075174
Store C2001587
Store D40045348
Store E50090435
Store F60060261

 

And would like to show it as per the example below

After selecting a slicer for Store A - the visualization/s should show like below ; ie the selected Store + the KPI value, but shown in the ranked position relative to all other stores - while masking all other store detail 

 

KPI 1Kpi 2KPI 3
---
-Store A (30)-
Store A (300)--
---
---
--Store A (522)

 

Any help would be greatly appreciated (even if we can do it for 1 KPI)

 

Thank you

1 ACCEPTED SOLUTION
yingyinr
Community Support
Community Support

Hi @DerekRadue ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. Please note that this method is only suitable for selecting one store. If you select multiple stores, the result will be incorrect...

1. Create a table with the below formula

Rank = GENERATESERIES(1,DISTINCTCOUNT('Table'[Store]),1)

2. Create 3 measures to get KPI 1, KPI 2 and KPI 3 to display in different positions base on the ranking

NKPI1 = 
VAR _rankKPI1 =
    RANKX (
        ALL ( 'Table'[Store] ),
        CALCULATE ( SUM ( 'Table'[KPI 1] ) ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF (
        SELECTEDVALUE ( 'Rank'[Value] ) = _rankKPI1,
        CALCULATE (
            SUM ( 'Table'[KPI 1] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                'Table'[Store] IN ALLSELECTED ( 'Table'[Store] )
            )
        ),
        BLANK ()
    )

yingyinr_0-1621232613456.png

Best Regards

Community Support Team _ Rena
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
yingyinr
Community Support
Community Support

Hi @DerekRadue ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. Please note that this method is only suitable for selecting one store. If you select multiple stores, the result will be incorrect...

1. Create a table with the below formula

Rank = GENERATESERIES(1,DISTINCTCOUNT('Table'[Store]),1)

2. Create 3 measures to get KPI 1, KPI 2 and KPI 3 to display in different positions base on the ranking

NKPI1 = 
VAR _rankKPI1 =
    RANKX (
        ALL ( 'Table'[Store] ),
        CALCULATE ( SUM ( 'Table'[KPI 1] ) ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF (
        SELECTEDVALUE ( 'Rank'[Value] ) = _rankKPI1,
        CALCULATE (
            SUM ( 'Table'[KPI 1] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                'Table'[Store] IN ALLSELECTED ( 'Table'[Store] )
            )
        ),
        BLANK ()
    )

yingyinr_0-1621232613456.png

Best Regards

Community Support Team _ Rena
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

Hi, Thank you that puts me on the track to get it done

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors