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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
NJ81858
Helper IV
Helper IV

'Greater than' slicer selection with list selection type

Hello,

 

I currently have a custom column that puts total sales into 1 of 3 groups: "$25k-$49k", "$50k-$100k", and "> $100K" based on the amount of total sales, and a slicer that lists these categories for filtering my sales data:

NJ81858_0-1684160453107.png

 

However, I just got a request to change these from ranges to a "Greater than" value, while keeping the same List selection type in the slicer, so these new values would be "> $25k", which would filter the data to anything greater than $25k, ">$50k", which would filter the data to anything greater than $50k, and "> $100k", which would give anything greater than $100k.

 

The issue that I am running into, is that this cannot be a calculated column, as there is overlap in the categories, and this cannot be a "greater than" type slicer, as the end user wants to be able to select the value and filter it, rather than dragging a slider. Is this possible? Thank you in advance!

1 ACCEPTED SOLUTION

Okay @NJ81858 in that case you have to create a new table and then create slicer:

New Table DAX will be as below:

Slicer Table = 
UNION(
ADDCOLUMNS('Table',
            "Sales_Ref",'Table'[Sales]>25,
            "Slicer",">25"
            ),
ADDCOLUMNS('Table',
            "Sales_Ref",'Table'[Sales]>50,
            "Slicer",">50"
            ),
ADDCOLUMNS('Table',
            "Sales_Ref",'Table'[Sales]>100,
            "Slicer",">100"
            )
)

In this new table you have to create another column as below:

Final Slicer = IF('Slicer Table'[Sales_Ref]=TRUE(),'Slicer Table'[Slicer],BLANK())

Output looks like this:

Kishore_KVN_0-1684240687205.png

 

Now create relationship between these two tables on product and use cross filtering as both direction.

Then output looks like this:

Kishore_KVN_1-1684240742366.pngKishore_KVN_2-1684240757759.pngKishore_KVN_3-1684240773396.png

 

Please note that table can be created in a bit easy way but I am not able to recall it now. 

 

 

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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

I answered a similar question here.  In the Category table, just changed the Upper limit column of each row to a very large number. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur This is what I currently have that puts my values into groups:

 

Group = IF ( AND( [Sales] >= 25000, [Sales] <= 50000), "$25k-$50k",
IF ( AND( [Sales] > 50000, [Sales] =< 100000), "$50k-$100k",
IF ( [Sales] > 100000, "> $100k", "< $25k")))

 

My issue is that I would like the values to be a Greater Than, rather than a Between, with the categories being "> $25k",  "> $50k", and "> $100k". In other words, a value of $125k would be in all categories, since it is greater than $25k, $50k, and $100k.

Hi,

You have not followed my advise from the previous post.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Kishore_KVN
Super User
Super User

@NJ81858 If my understanding is correct, you just want to create column saying just >25, >50 and >100 without other information so you can use either 'SWITCH' or 'IF' logic. 

Please find example DAX below:

Slicer Column = If(Sales>=25k&&Sales<50k,">25k",
                If(Sales>=50k&&Sales<100k,">50k",
                If(Sales>=100k,">100k", Blank())))

 

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

@Kishore_KVN 

What you suggested is what I currently have, what I need is a way to have each category extend from the bottom mark to the maximum value for sales. In other words, the "> $25k" category needs to include everything from $25k to the maximum value, so there ends up being overlap in the categories. For example, a sales value of $125k would be in all three categories, since it is greater than $25k, $50k, and $100k. Currently, the only way that I know how to achieve this is by having my slicer be a "greater than" type, like this:

NJ81858_2-1684170326950.png

The issue is that the end users are requesting it to be the "list" type slicer like in my original post, so I would like it to be in that format.

@NJ81858 can you please confirm that in the given example, $125K should be considered in >$25K, >$50K and also in >$100k right?

@Kishore_KVN Yes that is correct, $125k would be in every category.

Okay @NJ81858 in that case you have to create a new table and then create slicer:

New Table DAX will be as below:

Slicer Table = 
UNION(
ADDCOLUMNS('Table',
            "Sales_Ref",'Table'[Sales]>25,
            "Slicer",">25"
            ),
ADDCOLUMNS('Table',
            "Sales_Ref",'Table'[Sales]>50,
            "Slicer",">50"
            ),
ADDCOLUMNS('Table',
            "Sales_Ref",'Table'[Sales]>100,
            "Slicer",">100"
            )
)

In this new table you have to create another column as below:

Final Slicer = IF('Slicer Table'[Sales_Ref]=TRUE(),'Slicer Table'[Slicer],BLANK())

Output looks like this:

Kishore_KVN_0-1684240687205.png

 

Now create relationship between these two tables on product and use cross filtering as both direction.

Then output looks like this:

Kishore_KVN_1-1684240742366.pngKishore_KVN_2-1684240757759.pngKishore_KVN_3-1684240773396.png

 

Please note that table can be created in a bit easy way but I am not able to recall it now. 

 

 

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

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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