Forum Discussion

Naash's avatar
Naash
Frequent Visitor
4 years ago
Solved

Dynamic filtering based on Slicer selection

Hello,

 

I have a query on filtering data using Measure, 

Scenario - I have two slicers one helps me filter the Location coordinates and the other(manually generated value, has no relation with other data) helps in selecting a range (10 yards, 20 yards).  I want to know is it possible to link and use these values to identify list of other coordinates that fall within a specific range of the selected value ?

 

So whenever a user selects a specific coordinate and range i want to display the list of data and their coordinates that is within that range. Can this be done ? 

  • Please find the below solution,

     

    1. Created a table

     

    2. Create another table as below,

    3. Create a measure as below,

    Records in Yards range =
    var min_yard = MIN('Table_Yards_slicer'[Yards])
    var max_yard = MAX('Table_Yards_slicer'[Yards])
    var is_in_range = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Yards]>=min_yard && 'Table'[Yards]<=max_yard))
    return if(is_in_range>0,1,0)
     
    4. Place the above created measure into visual level filter,
     

     

    5. Yards slicer should be from 'Table_Yards_slicer' table.

     

     

    if you follow the above approach you can solve your issue.

1 Reply

  • Aburar_123's avatar
    Aburar_123
    Solution Supplier

    Please find the below solution,

     

    1. Created a table

     

    2. Create another table as below,

    3. Create a measure as below,

    Records in Yards range =
    var min_yard = MIN('Table_Yards_slicer'[Yards])
    var max_yard = MAX('Table_Yards_slicer'[Yards])
    var is_in_range = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Yards]>=min_yard && 'Table'[Yards]<=max_yard))
    return if(is_in_range>0,1,0)
     
    4. Place the above created measure into visual level filter,
     

     

    5. Yards slicer should be from 'Table_Yards_slicer' table.

     

     

    if you follow the above approach you can solve your issue.