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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
rangelferreira
Frequent Visitor

I need a slicer that would allow me to select range of values instead of all available values

Hello!
I am new to Power BI and I have looked for a post with this exact theme but I couldn't find it.

I have a collum which has rows with ramdom values such as: 

Image 258.png

 

I would like to have a slicer that gives me the option of selecting ranges of values instead of all possible values.

Example:

Select a range

0 -> 63

64 -> 127

128 -> 255

256 -> 511

512 -> 1023

1024 -> 2047

2048  -> 4095

and so on...

 

Any idea?

Thanks in advance!

 

 
1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @rangelferreira

 

We can create a calculated column likt that to work on it.

range = 
SWITCH (
    TRUE (),
    'Table'[KPI] <= 63
        && 'Table'[KPI] >= 0, "0->61",
    'Table'[KPI] > 63
        && 'Table'[KPI] <= 127, "64->127",
    'Table'[KPI] > 127
        && 'Table'[KPI] <= 255, "128->255",
    'Table'[KPI] > 255
        && 'Table'[KPI] <= 511, "256->511",
    'Table'[KPI] > 511
        && 'Table'[KPI] <= 1023, "512->1023",
    'Table'[KPI] > 1023
        && 'Table'[KPI] <= 2047, "1024->2047",
    'Table'[KPI] > 2047
        && 'Table'[KPI] <= 4095, "2048->4095",
    'Table'[KPI] > 4095, "..."
)

Capture.PNG

 

For more details, please check the pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @rangelferreira

 

We can create a calculated column likt that to work on it.

range = 
SWITCH (
    TRUE (),
    'Table'[KPI] <= 63
        && 'Table'[KPI] >= 0, "0->61",
    'Table'[KPI] > 63
        && 'Table'[KPI] <= 127, "64->127",
    'Table'[KPI] > 127
        && 'Table'[KPI] <= 255, "128->255",
    'Table'[KPI] > 255
        && 'Table'[KPI] <= 511, "256->511",
    'Table'[KPI] > 511
        && 'Table'[KPI] <= 1023, "512->1023",
    'Table'[KPI] > 1023
        && 'Table'[KPI] <= 2047, "1024->2047",
    'Table'[KPI] > 2047
        && 'Table'[KPI] <= 4095, "2048->4095",
    'Table'[KPI] > 4095, "..."
)

Capture.PNG

 

For more details, please check the pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thanks @v-frfei-msft that worked perfectly for the purpose!!! 😀

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @rangelferreira ,

 

look at this.

https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Thank you @mwegener for sharing this. It will be useful in the future. However @v-frfei-msft had the solution for the situation I was in.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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