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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SandervdM
Frequent Visitor

Dynamically filtering rows

I'm having an issue in excluding rows from a table (visual). From 10 rows I want to show 2 rows only in December; all other rows are shown each month. Using a slicer the user can choose a month, so relationship between dates table and data table exists based on date. For all rows data exists for each month. Tried filtering in query editor but that does not work (or I'm doing the wrong thing).

Anyone any ideas how to accomplish this?

 

Regards,
Sander

2 ACCEPTED SOLUTIONS

Hi @SandervdM 

 

Add the measure:

Measure = var a = SELECTEDVALUE(Dates[monthName])
Return 
IF(a = "December"&&"Third row" in VALUES(List1[Description]),0,1)

Then drag it to the filter pane with the measure is not 0:

 06.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

Almost perfect: now the line "Third Row" is NOT visible when selected December in the slicer. Updated the if statement with a not() and it worked.

 

Thanks.

 

Measure = var a = SELECTEDVALUE(Dates[monthName])
Return 
IF( NOT(a = "December") &&"Third row" in VALUES(List1[Description]),0,1)

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @SandervdM 

 

You might consider creating pbix file that will contain some sample data, upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

ok, thanks for the hint.

 

Attached a link to a PBIX file with the data

https://1drv.ms/u/s!Ai7aUwtUNnYVmB_RgO20M4wgpe8O?e=v2qZIj

 

Desired result as displayed in the picture below. When selecting the month of December in the slicer an additional row is displayed.

Desired result.png

Hi @SandervdM 

 

Add the measure:

Measure = var a = SELECTEDVALUE(Dates[monthName])
Return 
IF(a = "December"&&"Third row" in VALUES(List1[Description]),0,1)

Then drag it to the filter pane with the measure is not 0:

 06.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Almost perfect: now the line "Third Row" is NOT visible when selected December in the slicer. Updated the if statement with a not() and it worked.

 

Thanks.

 

Measure = var a = SELECTEDVALUE(Dates[monthName])
Return 
IF( NOT(a = "December") &&"Third row" in VALUES(List1[Description]),0,1)

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.