Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filtering a table based on selected filters and getting a subset

I have a table with below fields: name date responsetime NumberOfFailures Region I need to have two filters: Date Filter: Slicer to select date range Checkbox to select a region Based on filters above i need to get below data: Top 10 rows with highest response time Top 10 rows with least response time The problem is the above data should be dynamic, based on region and date filter. 1. I am unable to apply selected filters on the given table 2. I am unable to filter top 10 rows based on filters Any leads are highly appreciated....

  • Hi Anonymous ,

     

    Create date and region dimension tables as slicers.

    Then create measure like this and apply it to visual level filter.

    3 per Region =
    VAR top_3 =
        CALCULATE (
            RANKX ( ALLSELECTED ( 'Table'[api name] ), 'Table'[Total time],, DESC, DENSE )
        )
    VAR least_3 =
        CALCULATE (
            RANKX ( ALLSELECTED ( 'Table'[api name] ), 'Table'[Total time],, ASC, DENSE )
        )
    RETURN
        IF (
            MAX ( 'Table'[date] ) IN VALUES ( 'Table 2'[date] )
                && MAX ( 'Table'[region] ) IN VALUES ( 'Table 3'[region] )
                && ( top_3 <= 3
                || least_3 <= 4 ),
            1
        )

    Sample .pbix

     

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

3 Replies