Forum Discussion

Moji_mook's avatar
Moji_mook
Frequent Visitor
9 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 ...
  • Amar_Kumar's avatar
    9 months ago

    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.