Forum Discussion

dnzdvd's avatar
dnzdvd
New Member
1 year ago
Solved

multiple field parameters controlled by one slicer or another filed parameter

Hello

 

I created a field parameter for with grouping argument. I added measures simply as count and percent according to each group. I have another field parameter using different measures but with the same grouping as the first one. How can I create another filter that filters both field parameter filters at the same time?
When I say grouping, from the syntax of field parameter, I am referring to the 'count' and 'percentage' groups:

Record Count = {
    ("ID", NAMEOF('_measures'[dist_id]), 1 , "count"),
    ("NAME", NAMEOF('_measures'[dist_name), 0, "count"),
    ("ID %", NAMEOF(_measures[dist_id_%]), 2, "percentage"),
    ("NAME %", NAMEOF(_measures[dist_name_%]), 3, "percentage")
}

The other field parameter uses different measure but same grouping of count and percentage. I would like a single slicer/filter that filters both visuals using different parameters.
 
Thank you
  • Anonymous's avatar
    Anonymous
    1 year ago

     

    Thanks for the reply from lbendlin , please allow me to provide another insight:

    Hi, dnzdvd 

    Regarding the issue you raised, my solution is as follows:

    1.First I have created the following table and the column names and data are the data you have given:

     

     

     

    2.Create the following calculated table to combine the contents of the two parameters into one table:

     

    Table =
    VAR p1 =
        SELECTCOLUMNS (
            'Parameter1',
            "1", 'Parameter1'[Parameter],
            "2", 'Parameter1'[Value4]
        )
    VAR p2 =
        SELECTCOLUMNS (
            'Parameter2',
            "1", 'Parameter2'[Parameter2],
            "2", 'Parameter2'[Value4]
        )
    RETURN
        UNION ( p1, p2 )
    

     

     

     

    3.Secondly, create two measures, each applied to the respective slicers:

     

    OOO1 =
    VAR CC1 =
        VALUES ( 'Table'[1] )
    RETURN
        IF ( MAX ( 'Parameter1'[Parameter] ) IN CC1, 1, 0 )
    

     

     

    OOO2 =
    VAR CC2 =
        VALUES ( 'Table'[1] )
    RETURN
        IF ( MAX ( 'Parameter2'[Parameter2] ) IN CC2, 1, 0 )

     

     

    4.Here are the final results:

     

     

    5.Of course, you might also consider establishing a relationship between the two parameters:

     

    However, the drawback is that if you create a slicer, it will only filter the contents of this table and those that belong to the same group as the selected content.

     

     

    Please find the attached pbix relevant to the case.

     
    Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
     

    Best Regards,

    Leroy Lu

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

     

2 Replies

  • If you synchronize them anyway then you don't need the second slicer.

  • Anonymous's avatar
    Anonymous
    Not applicable

     

    Thanks for the reply from lbendlin , please allow me to provide another insight:

    Hi, dnzdvd 

    Regarding the issue you raised, my solution is as follows:

    1.First I have created the following table and the column names and data are the data you have given:

     

     

     

    2.Create the following calculated table to combine the contents of the two parameters into one table:

     

    Table =
    VAR p1 =
        SELECTCOLUMNS (
            'Parameter1',
            "1", 'Parameter1'[Parameter],
            "2", 'Parameter1'[Value4]
        )
    VAR p2 =
        SELECTCOLUMNS (
            'Parameter2',
            "1", 'Parameter2'[Parameter2],
            "2", 'Parameter2'[Value4]
        )
    RETURN
        UNION ( p1, p2 )
    

     

     

     

    3.Secondly, create two measures, each applied to the respective slicers:

     

    OOO1 =
    VAR CC1 =
        VALUES ( 'Table'[1] )
    RETURN
        IF ( MAX ( 'Parameter1'[Parameter] ) IN CC1, 1, 0 )
    

     

     

    OOO2 =
    VAR CC2 =
        VALUES ( 'Table'[1] )
    RETURN
        IF ( MAX ( 'Parameter2'[Parameter2] ) IN CC2, 1, 0 )

     

     

    4.Here are the final results:

     

     

    5.Of course, you might also consider establishing a relationship between the two parameters:

     

    However, the drawback is that if you create a slicer, it will only filter the contents of this table and those that belong to the same group as the selected content.

     

     

    Please find the attached pbix relevant to the case.

     
    Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
     

    Best Regards,

    Leroy Lu

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