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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Filter on table with measure not working

Hi,

 

I have two tables Tab1 and Tab2 both containing one column of integer from 1 to 20 000.

 

Goal : user select a first value (Whole Number) from Tab1[col1] with a slicer and then I want an other slicer where the user can select only values between 1 and the selected value in Tab1.

 

I tried to get the selected value thanks to SELECTEDVALUE(Tab1), that is working I can display the choice in a table. 

But to filter Tab2 by doing FILTER(Tab2, Tab2[col2]<[selectedvalue]) it creates me a blanck table.

Whereas if I do  FILTER(Tab2, Tab2[col2]<10) it's working I have only values between 1 and 10 for instance of my Tab2.

 

My measure is a wholenumber.

I have no relationship between Tab1 and Tab2.

 

Thanks for your help,

 

Don't hesitate if I'm not clear,

 

Rob

1 ACCEPTED SOLUTION

@Anonymous 
Not sure how you've created the filter but it should be something like:

FilterMeasure =
COUNTROWS ( FILTER ( Tab2, Tab2[col2] < [selectedvalue] ) )

Place it in the filter pane of the 2nd slicer, select "is not blank" the apply the filter.

View solution in original post

8 REPLIES 8
tamerj1
Super User
Super User

Hi @Anonymous 
Double check the data type of both columns and confirm both are of intiger data type not text or general.

Anonymous
Not applicable

Hi @tamerj1,

 

Thanks for you answer,

 

the data type of both columns is "Whole number"

@Anonymous 
Not sure how you've created the filter but it should be something like:

FilterMeasure =
COUNTROWS ( FILTER ( Tab2, Tab2[col2] < [selectedvalue] ) )

Place it in the filter pane of the 2nd slicer, select "is not blank" the apply the filter.

Anonymous
Not applicable

This is not working,

 

When I do it with [selectvalue] I have a blanck table but if I do :

 

FilterMeasure =
COUNTROWS ( FILTER ( Tab2, Tab2[col2] < 8 )

 

with (8 choosed just for the example) it's working.

 

I guess the problem is my measure but I can display it, it has the good type ect

@Anonymous 
I assumed that there is no relationship between the two tables. Right?

Anonymous
Not applicable

No I said it in my first message

 

I tried to make one  Tab1[col1] (1:*) Tab2[col2] but instead of returning a blanck table after filtering I have all Tab2. That's why I didn't keep the relation ship

FreemanZ
Super User
Super User

hi @Anonymous 

could you elabroate how do you implement "to filter Tab2 by doing FILTER(Tab2, Tab2[col2]<[selectedvalue]) "?

Anonymous
Not applicable

Thanks @FreemanZ for your answer,

 

Fisrt I have slicer where user can choose a Whole Number from 1 to 20 000 from Tab1[col1].

Then I have measure, let's note it measure1, such that measure1=SELECTEDVALUE(Tab1[col1]).

After that I create a table : table2=filter(Tab2, Tab2(col2)<[measure1]). 

And table2 is a blanck table with this method.

 

I can precise more if needed. 

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.