Filtering by Calculated Column Tenure Not Incluing All Levels
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 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 RETURN SWITCH(__Selection, "<120",IF(SUM([MainTable_Tenure])<120,1,0), "<90",IF(SUM([MainTable_Tenure])<90,1,0)
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.