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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Filter Table based on Slicer Selection

 

Hi,

 

I've got a table that I want to filter based on what a Slicer selection returns.

 

The context is that I have a slicer table that looks like this:

MIN VIEWS
100

150

200

250

 

The customer should be able to pick one of the MIN VIEWS through the slicer and be returned a table with only the rows which are over the selected amout of Views.

 

 

My code looks like this:

Filtered Table = CALCULATETABLE('datatable'), FILTER('datatable', 'datatable'[Visits] > SELECTEDVALUE('MIN Views'[MIN VIEWS])  )  )

 

 

The selection works, as you can see below, however the filter won't work (e.g. all rows from the datatable are displayed in the new table.

Capture4.PNG

 

 

 

 

 

 

Thanks in advance,

Leon

1 ACCEPTED SOLUTION

@Anonymous add measure as below and in table visual, drop product and this new measure, you will have solution

 

Views Total = 
VAR __selectedValue = SELECTEDVALUE( Table2[MinViews] )
RETURN 
CALCULATE( 
SUM( Table3[Views] ), 
Table3[Views] >= __selectedValue
 )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

10 REPLIES 10
parry2k
Super User
Super User

@Anonymous you cannot use slicer value in calculatetable, you need to create measure and use that in a table visual to show the data.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable


@parry2k wrote:

@Anonymousyou cannot use slicer value in calculatetable, you need to create measure and use that in a table visual to show the data.


Hi Parry,

 

thanks for your reply.

 

Unfortunately I do not quite understand what you mean with creating a measure and using that in a table visual.

 

I just created a Measure that gives me the selected views, and tried using that as a filter instead - it didn't work either. Can you explain a bit more in depth?

 

Thank you for your help!

 

Leon

@Anonymous it will be much easier to provide an answer if you post sample data with expected output.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable


@parry2k wrote:

@Anonymousit will be much easier to provide an answer if you post sample data with expected output.


@parry2k Thats a good Idea. So I have this table:

 

MIN VIEWS
100

150

200

250

 

and this table.

Product IDViews
1500
2300
3450
430
520

 

My expected Output is a new table, that dependant on some form of selection tool, gives me this output:

 

Capture3.PNG

 

 

Product IDViews
1500
3450

 

 

Thanks,

Leon

 

@Anonymous add measure as below and in table visual, drop product and this new measure, you will have solution

 

Views Total = 
VAR __selectedValue = SELECTEDVALUE( Table2[MinViews] )
RETURN 
CALCULATE( 
SUM( Table3[Views] ), 
Table3[Views] >= __selectedValue
 )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi All, 

 

I am having the same issue and fairly new to dax. I am trying show the numbers based on the selected option in slicer and I am not getting any luck. 

 

So far, here is the dax that I have but incomplete: 

 

REGION Exp. Landing % vs 2023 Commit Filter =
VAR _selectedValue = SELECTEDVALUE('2023 Attainment Details Back Up'[User TP Selling Role])
RETURN
CALCULATE(([ATT GRID OVERALL S + V]+[SUM of 80% SFDC Projection]+[REGION Weighted Pipeline]),'2023 Attainment Details Back Up','2023 Attainment Details Back Up'[User TP Selling Role])
)

 

Anonymous
Not applicable


@parry2k wrote:

@Anonymousadd measure as below and in table visual, drop product and this new measure, you will have solution

 

Views Total = 
VAR __selectedValue = SELECTEDVALUE( Table2[MinViews] )
RETURN 
CALCULATE( 
SUM( Table3[Views] ), 
Table3[Views] >= __selectedValue
 )

@parry2k That works quite well, thank you. However when I add any other columns, new Products come into the table. Any chance I can prevent that? So then the output looks like this:

Product IDViews TotalPrice
150050
2 60
345010
4 22
5 12

 

I don't want 2,4,5 in the table though, because I'm working with and visualizing the numbers...

 

 

Thanks,

Leon

@Anonymous in visual level filter, in measure , choose great than zero.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi i have more or less the same problem.. https://community.powerbi.com/t5/DAX-Commands-and-Tips/FILTER-TABLE-BASED-ON-SELECTED-VALUE/m-p/1075...

But it doesnt work for me this solution.

Can you help ?

Anonymous
Not applicable


@parry2k wrote:

@Anonymousin visual level filter, in measure , choose great than zero.


Thank you parry!!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors