Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Use one slicer for two calculated tables

I have two summary tables that let me calculate a sum of sales by business for two different product lines (Prod a is in one summary table and Prod b is in another summary table). I calculated a rank...
  • v-xicai's avatar
    7 years ago

    Hi Anonymous ,

     

    You need to show the top 50 of sales for Prod A and top 50 of sales for Prod B separately, right? If yes, you can follow the steps below.

     

    1.Enter Query Editor, add the custom column Prod in table Prod A and Prod B.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    2. Combine the two tables into single table Append1 to replace table Prod A and Prod B using Append, then the click "Close & Apply" button.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    3. Create rank column in table Append1 like DAX below, let it as the source of Slicer visual.

     

    Rank= RANKX(FILTER(Append1 ,Append1 [Prod]=EARLIER(Append1 [Prod])),Append1 [Sales],, Desc, Dense)

     

    4.If you need a visual to display the whole top 50 of sales, you can create measure Filter1 table Append1, then put measure Filter1 in the Visual Level Filter of goal visual, and setting the Filter1 as "is not blank".

     

    Filter1=IF(MAX(Append1 [Rank])<=50,1,BLANK()))

     

    Best Regards,

    Amy

     

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