Forum Discussion

JavierCM's avatar
JavierCM
Frequent Visitor
2 years ago
Solved

table filtered with a slicer

Hi and thank you. First of all I,m very new in power BI DAX expressions and now have a wall in front of me with this (I thought) easy step. Maybe it is a very rokie question but I didn't find the s...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi JavierCM ,hello lbendlin,thank you for your prompt reply!
    For your requirements, please create a measure as shown below:

    FilteredRows = 
       VAR SelectedMinWeek = MIN('series'[weeknum])
       VAR SelectedMaxWeek = MAX('series'[weeknum])
       RETURN
       CALCULATE(
          COUNTROWS(relationships),
          FILTER(
             relationships,
             relationships[start week] <= SelectedMaxWeek &&
             (ISBLANK(relationships[end week]) || relationships[end week] >= SelectedMinWeek)
          )
       )

     Then filter the table use the measure like this:

    This allows us to dynamically filter the table with slicer values according to the desired logic:

     

    Best regards,

    Joyce

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