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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PamelaAG
Frequent Visitor

How to use a measure in a slider filter a table

Dear users,

 

I would like to ask your feedback about how to use a measure into a slider in order to filter a table and some graphs.

 

I have created a measure called "Index Value" that return the values of 5, 3 and 1, the results are being shown on the table by customer and it is working perfectly.

 

The problem comes when I tried to used this results in a slicer to filter the table, in order to that, I created table called "INDEX INDICATOR" to which I gave them the following values

Index ColorIndex Number
Green1
Yellow3
Red5

 

Then I created another measure with the following formula

 

aIndex calculator =
var AAA = [Index Value]
RETURN
IF
(HASONEVALUE('INDEX INDICATOR'[Index Color]),
SWITCH(TRUE(),
VALUES('INDEX INDICATOR'[Index value])=1&&AAA=1,AAA,
VALUES('INDEX INDICATOR'[Index value])=3&&AAA=3,AAA,
VALUES('INDEX INDICATOR'[Index value])=5&&AAA=5,AAA),AAA
)
 
The conexiton doesn't work, everytime I click on any of the values, nothing is being filtered I cannot use at all the slicer.
 
Do you happen to know another way to do this or tell me what I am doing wrong?
 
Thank you in advance, 
Pamela
1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @PamelaAG 

 

You should know that measure only returns a value, of course it won't have a filter effect.

If you want measure to filter table, you need to put it in filter pane.

I created a sample for reference.


Measure = IF([index value] in VALUES(Table2[index number]),1,0)

vjaneygmsft_1-1644304272605.png

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

View solution in original post

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @PamelaAG 

 

You should know that measure only returns a value, of course it won't have a filter effect.

If you want measure to filter table, you need to put it in filter pane.

I created a sample for reference.


Measure = IF([index value] in VALUES(Table2[index number]),1,0)

vjaneygmsft_1-1644304272605.png

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

amitchandak
Super User
Super User

@PamelaAG , You need something like this with help from you base table having measure

Sumx(filter(values(Table[ID]), [measure] = max('INDEX INDICATOR'[Index Number])),[measure])

 

 

Check this, in place between you will have =

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, thank you for your answer!

 

You mean I need to insert this formula into this other formula?:

aIndex calculator =
var AAA = [Index Value]
RETURN
IF
(HASONEVALUE('INDEX INDICATOR'[Index Color]),
SWITCH(TRUE(),
VALUES('INDEX INDICATOR'[Index value])=1&&AAA=1,AAA,
VALUES('INDEX INDICATOR'[Index value])=3&&AAA=3,AAA,
VALUES('INDEX INDICATOR'[Index value])=5&&AAA=5,AAA),AAA
)

@PamelaAG , Based on what I got, I want to reconsider the approach ,

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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