Forum Discussion

chris__1's avatar
chris__1
Advocate II
2 years ago
Solved

Measures on visual-level

How can I create a measure that reflects visual level filters that are set in the filter pane in the section 'Filters on this visual'?

Having one table with 3 rows:


table1.column1
1
2
3

 

Putting this in a table visual and setting the visual level filter for column1 to < 3 (Filter Pane: Filters on this Visual) I would like a measure to show the number of rows shown in the visual (= two rows!).

 

measure = COUNTROWS( table1 ) >> returns 3
measure = COUNTROWS( ALLSELECTED( table1 ) ) >> returns 3
measure = COUNTROWS( ALL( table1 ) ) >> returns 3

 

I can use the page-level filter in the filter pane of course - but I would like to know how this can be done when using the visual level filter pane!

Thanks!

  • chris__1 

    Incase if you want to put your column in one table visual and measure on a different visual then, AFAIK then you will not be able to get your desired output. Because visual level filters on one visual will not propagate to other visuals. Either you need to use page level or report level filters to create a filters pane. 

    Then you will be able to capture all the filters on your report. Here is an intresting article about DUMPFilters by SQL BI team: https://www.sqlbi.com/articles/displaying-filter-context-in-power-bi-tooltips/

4 Replies

  • chris__1 

    Incase if you want to put your column in one table visual and measure on a different visual then, AFAIK then you will not be able to get your desired output. Because visual level filters on one visual will not propagate to other visuals. Either you need to use page level or report level filters to create a filters pane. 

    Then you will be able to capture all the filters on your report. Here is an intresting article about DUMPFilters by SQL BI team: https://www.sqlbi.com/articles/displaying-filter-context-in-power-bi-tooltips/

    • chris__1's avatar
      chris__1
      Advocate II

      tharunkumarRTK thanks! Very interesting indeed! The solution is easy of course - like you said just use the page level filters. However still interesting that there is no easy solution to this!

    • chris__1's avatar
      chris__1
      Advocate II

      thanks Greg_Deckler  for your answer!

       

      It seems I can't upload a pbix file - but here is a screenshot of the file you created.

       

      I would like to have a measure that displays the current row count (with visual level filter set in the filter pane): it shows "3" and I would like it to show "2":