Forum Discussion

algunn14's avatar
algunn14
Frequent Visitor
4 years ago
Solved

I need help creating a dimension selector

I want to create 2 slicers:

  1. Slicer 1: Values: Weekly, Monthly, Quarterly
  2. Slicer 2: Values will be dependent on slicer 1. For example, if the 'Monthly' selection is made on slicer 1, slicer 2's values will be: Jan 2022, Feb 2022, Mar 2022 etc.... if 'Quarterly' is selected for slicer 1, slicer 2 will have values: 2022 Q1, 2022 q2, 2022 q3

 

I have seen people do something similar by creating a dynamic measure selector, but I couldn't find anything that allowed you to dynamically switch between fields containing string values.

 

Slicer 1 is in the screenshot below to the left of the blue arrow (#1). 

 

I created a measure using SELECTEDVALUE that's value will switch to whatever value is selected from slicer 1  (#2 in screenshot below).

 

Finally I created a SWITCH TRUE calculation that I want to be the field I use for my 2nd slicer. I tried referencing the selected value calc I created in step #2, and depending on what that value is I return a different date column in my date table. I am note sure why but I keep just getting null values. I believe the issue has something to do with my SELECTEDVALUE calculation I created but I can't quite figure it out. Any guidance here would be greatly appreciated, I've been stumped on this one for a while.

 

Link to PBIX File 

 

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi algunn14 ,

    We cannot do this directly.

    Please refer to my pbix file to see if it helps you.

    Create a measure.

    Quarterly = var _1=SELECTEDVALUE(date_range_table[Date Range])
    return
    IF(_1="Monthly",BLANK(),MAX(Date_Table[yyyy_qq]))

    Then put the Date_Table[yyyy_qq] and Date_Table[mmm-yyyy] to two slicers. Then filter the two slicers.

    Then hide the two slicer titles.

    I have also found a similar post, please refer to it to see if it helps you.

    Solved: Slicer Filtering Another slicer - Microsoft Power BI Community

     

    Best Regards

    Community Support Team _ Polly

     

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi algunn14 ,

    We cannot do this directly.

    Please refer to my pbix file to see if it helps you.

    Create a measure.

    Quarterly = var _1=SELECTEDVALUE(date_range_table[Date Range])
    return
    IF(_1="Monthly",BLANK(),MAX(Date_Table[yyyy_qq]))

    Then put the Date_Table[yyyy_qq] and Date_Table[mmm-yyyy] to two slicers. Then filter the two slicers.

    Then hide the two slicer titles.

    I have also found a similar post, please refer to it to see if it helps you.

    Solved: Slicer Filtering Another slicer - Microsoft Power BI Community

     

    Best Regards

    Community Support Team _ Polly

     

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

    • algunn14's avatar
      algunn14
      Frequent Visitor

      Thanks for the response! I was hoping there was a solution that would involve one dynamic field, but if that is not possible than this is probably the next best option. I'll leave this as unresolved for now to see if others know of a way, but if I don't get any traction I'll mark this as the solution. Thanks again, I really appreciate the support.