Forum Discussion

Moji_mook's avatar
Moji_mook
Frequent Visitor
8 months ago
Solved

Field Parameter with value from column

Hi Community, 

 

I have field parameter of App Owner and Group. My data look like 

App Owner | Group 

Person A          Data

Person B          Data

Person A          Dev

Person C          Dev

 

Now, I have field parameter which can switch by App Owner and Group. But, What I want is getting the person A,B and C under App Owner again also for Group. For example, I should select by App Owner and by Person. If selected App Owner then show all person, If selected person A shows only person A.

 

Slicer

App Owner 

     Person A

     Person B

     Person C

Group

      Data

      Dev

 

Is this possible to do?

  • Yes, this is possible, but not with a single field-parameter slicer.

    To achieve this behavior, you need two disconnected slicer tables and a filtering measure.

    First, create a small table to choose what you want to filter by (App Owner or Group):

    Dimension Selector table
    App Owner
    Group

    Next, create another table that holds all possible values for both App Owner and Group:

    Value Selector table
    Person A – App Owner
    Person B – App Owner
    Person C – App Owner
    Data – Group
    Dev – Group

    Then create a measure to apply the filter based on the selections:

    Dynamic Filter =
    VAR SelectedDimension = SELECTEDVALUE(DimensionSelector[Dimension])
    VAR SelectedValue = SELECTEDVALUE(Value Selector[Value])
    RETURN
    IF (
    SelectedDimension = "App Owner"
    && ( ISBLANK(SelectedValue)
    || SELECTEDVALUE('Table'[App Owner]) = SelectedValue ), 1,
    IF ( SelectedDimension = "Group"
    && ( ISBLANK(SelectedValue)
    || SELECTEDVALUE('Table'[Group]) = SelectedValue ),1,0))

    Use the model like this:
    Slicer 1 → Dimension Selector[Dimension]
    Slicer 2 → Value Selector[Value]
    Apply the Dynamic Filter measure to the visual and set it to 1.

    Result:
    If App Owner is selected with no value, all persons are shown.
    If App Owner and Person A are selected, only Person A is shown.
    If Group is selected with no value, all groups are shown.
    If Group and Data are selected, only Data is shown.

    This approach works reliably and avoids limitations of field parameters.

5 Replies

  • Moji_mook , Simple Slicer with two fields can do that. We do not need a field parameter for that.

     

    The information you have provided is not making the problem clear to me. Can you please explain with an example.

    Appreciate your Kudos.

  • Yes, this is possible, but not with a single field-parameter slicer.

    To achieve this behavior, you need two disconnected slicer tables and a filtering measure.

    First, create a small table to choose what you want to filter by (App Owner or Group):

    Dimension Selector table
    App Owner
    Group

    Next, create another table that holds all possible values for both App Owner and Group:

    Value Selector table
    Person A – App Owner
    Person B – App Owner
    Person C – App Owner
    Data – Group
    Dev – Group

    Then create a measure to apply the filter based on the selections:

    Dynamic Filter =
    VAR SelectedDimension = SELECTEDVALUE(DimensionSelector[Dimension])
    VAR SelectedValue = SELECTEDVALUE(Value Selector[Value])
    RETURN
    IF (
    SelectedDimension = "App Owner"
    && ( ISBLANK(SelectedValue)
    || SELECTEDVALUE('Table'[App Owner]) = SelectedValue ), 1,
    IF ( SelectedDimension = "Group"
    && ( ISBLANK(SelectedValue)
    || SELECTEDVALUE('Table'[Group]) = SelectedValue ),1,0))

    Use the model like this:
    Slicer 1 → Dimension Selector[Dimension]
    Slicer 2 → Value Selector[Value]
    Apply the Dynamic Filter measure to the visual and set it to 1.

    Result:
    If App Owner is selected with no value, all persons are shown.
    If App Owner and Person A are selected, only Person A is shown.
    If Group is selected with no value, all groups are shown.
    If Group and Data are selected, only Data is shown.

    This approach works reliably and avoids limitations of field parameters.

    • v-aatheeque's avatar
      v-aatheeque
      Community Support

      Hi Moji_mook 

      Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi Moji_mook 

        Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.

  • Honestly, this isnt' clear to me: Now, I have field parameter which can switch by App Owner and Group. But, What I want is getting the person A,B and C under App Owner again also for Group.

    Can you please show your expected result?