Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
chris__1
Helper III
Helper III

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!

1 ACCEPTED SOLUTION
tharunkumarRTK
Super User
Super User

@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/

View solution in original post

4 REPLIES 4
tharunkumarRTK
Super User
Super User

@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/

@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!

Greg_Deckler
Super User
Super User

@chris__1 Try: 

Measure = COUNTROWS(ALLSELECTED('Table'[Column1]))

See attached PBIX file.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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":

 

chris__1_0-1707402272162.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.