Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Filtering by Calculated Column Tenure Not Incluing All Levels

Hello All,


I am new to Power BI and I am struggling to achieve a filter/slicer, and here is the story:


We are using power bi desktop october 2020 since the platform we are using only allows to upload these pbx report/dashboards.


We have a table that includes the tenure of the employees on days, so I created a calculated column that label them as follows:


Note: The calculated column is just a string as showin in the example dax:




The problem I have is that the calculated column is somehow overwriting the labels, so for example if I choose <30 it works well, if I choose <60 will include only those from between >= 30 and <60. So the main problem is that higher selections are not including lower ones.


If I want to get all those <120 I must check <120, <90, <60, <30 together. So my question is if there is a way to include lower tenure, <60 include <30 or <90 include <60 and <30 as well. so If I finally select just the <120 option on the slicer it includes <120, <90, < 60 and <30 without having to select all of them.


Please let me know if this makes sense and if I explained myself.


Thanks in advance to all!



Community Support
Community Support

Hi @appnalytica ,


Has your problem been solved? If it is solved, please mark a reply which is helpful to you.


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


Best Regards,

Super User
Super User

@appnalytica Create your slicer table as a separate Enter Data query. Then create a measure that returns the row given the right criteria. Like:

Measure =
  VAR __Selection = MAX('Slicer'[Value])

@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!



Thanks for your really quick response I really appreciate it. I created a new table just with the values:


Then I added the slicer getting the values from that table and column and got it:


When I make a selection the circular dots appear on the corners of the visuals like it's updating but it seems it is not affecting/filtering the main table. This is the processed I followed:

1. Create new table just with the filter values <120, <90, etc.

2. Created a new slicer and used the new table column as the values for the slicer which gave me this:



3. Create the new measure on the main employee table setting up the references like this:

Measure =
VAR __Selection = MAX('Slicer'[Value]) <- This is the slicer on Main table with the values from the new table





I am not sure if am missing something or what could be wrong I also checked the interactions and it seems it's applying but its not changing the other visuals, for example when I choose <30 show 1200, <60 1600 (1200 <30 + 400 <60) and so on.


Thanks again for all your help!

Hi @appnalytica ,


I create the following sample data:




Then create the measure and show items when the measure is 1.


Measure = 
VAR __Selection = SELECTEDVALUE('Slicer'[Value])
    "<120", IF( SUM(MainTable[Tenure]) < 120, 1, 0 ),
    "<90", IF( SUM(MainTable[Tenure]) < 90, 1, 0 ),
    "<60", IF( SUM(MainTable[Tenure]) < 60, 1, 0 ),
    "<30", IF( SUM(MainTable[Tenure]) < 30, 1, 0 ),
    ">=120", IF( SUM(MainTable[Tenure]) >= 120, 1, 0 ),



If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.