Forum Discussion

LH01's avatar
LH01
Regular Visitor
9 years ago
Solved

Multiple Slicer Drop Downs - Same Field/One Chart

Hi,

 

Wondering if there is any way to use multiple drop down slicers with the same field to control what information is displayed on a chart.

 

For example, I have the following data set:

 

State            Date         Amount

California     1/1/17       2,312

California     1/2/17       2,413

California     1/3/17       2,453

New York     1/1/17       3,154

New York     1/2/17       3,756

Texas            1/1/17       4,576

Texas            1/2/17       5,345

 

I want to be able to select California in one drop down box and this will be plotted on the line chart, then select New York in another drop down box and this would also be plotted on the line chart for comparison purposes. Simple in Excel, not sure about Power BI.

 

Any help would be much appreciated, thanks.

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi LH01,

     

    Current power bi only support analysis date value as date hierarchy.

     

    For your scenario, you can follow below steps to manually create a custom hierarchy column.

    Source table:

     

    1. Add calculated column to analysis the hierarchy level.

    Hierarchy = PATH([ID],[Parent])

     

     

    2. Add calculated column to store the different level columns.

    Level 1 = PATHITEM([Hierarchy],1) 
    Level 2 = PATHITEM([Hierarchy],2) 
    Level 3 = PATHITEM([Hierarchy],3) 

     

     

    3. Use these level columns to create hierarchy column.

     

    4. Use this hierarchy column as the source of hierarchy slicer.

     

    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi LH01,

     

    Current power bi only support analysis date value as date hierarchy.

     

    For your scenario, you can follow below steps to manually create a custom hierarchy column.

    Source table:

     

    1. Add calculated column to analysis the hierarchy level.

    Hierarchy = PATH([ID],[Parent])

     

     

    2. Add calculated column to store the different level columns.

    Level 1 = PATHITEM([Hierarchy],1) 
    Level 2 = PATHITEM([Hierarchy],2) 
    Level 3 = PATHITEM([Hierarchy],3) 

     

     

    3. Use these level columns to create hierarchy column.

     

    4. Use this hierarchy column as the source of hierarchy slicer.

     

    Regards,

    Xiaoxin Sheng