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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
mscla
Advocate I
Advocate I

Error in the minimum value range slicer for a specific product

Hi everyone,

I don't know if it's a bug in the Power Bi Slicer or if I'm doing something wrong.

I need to create a data slicer to vary the data between the minimum and maximum value for a specific product, so I created a Slicers for him.

 

When I set the maximum value, it removes all contracts from the SQSLL product, but if I set the minimum SQSLL value, it removes all contracts from other products.

mscla_0-1718814334016.png

 

I looked for a solution and didn't find it.

Could someone help me with this please?


Power BI Sales slicer Product.pbix 

 

thanks

 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

You only have a single table. Your slicers will overlay (ie both will be applied together) when they filter your data.

 

Use disconnected tables for your slicer and then use measures as visual filters for your tables A and B.

View solution in original post

Anonymous
Not applicable

Hi @lbendlin ,thanks for your quick reply, I will add more.

Hi @mscla ,

As @lbendlin  said, you need to create a disconnected table for slicer.

Please follow these steps:

1.Use the following DAX expression to create a table.

Table = CALCULATETABLE(VALUES('table Sales'[Sales]),'table Sales'[Product] = "CQSSL")

2.Use the following DAX expression to create a measure

Measure = 
VAR _product = SELECTEDVALUE('table Sales'[Product])
VAR _minforSlicer = MIN('Table'[Sales])
VAR _maxforSlicer = MAX('Table'[Sales])
VAR _result = IF(_product <> "CQSSL",
SUM('table Sales'[Sales]),
SUMX(FILTER('table Sales','table Sales'[Sales] >= _minforSlicer && 'table Sales'[Sales] <= _maxforSlicer),[Sales])
)
RETURN _result

3.Final out put

vzhouwenmsft_0-1718860310052.png

vzhouwenmsft_1-1718860340440.png

 

Best Regards,
Wenbin Zhou
If this post helps, please mark me and @lbendlin  as the solution.

 

 

View solution in original post

3 REPLIES 3
mscla
Advocate I
Advocate I

Thank you very much @lbendlin and @Anonymous 

Really appreciate your help, and its really worked!

My goal is to have a slicer for each product that the user can increase or decrease for each product. so, I created a combinedMeasure and its working

mscla_0-1718867095386.png

MeasureCombined =
VAR _product = SELECTEDVALUE('table Sales'[Product])
VAR _result =
    SWITCH(
        TRUE(),
        _product <> "CQPT", SUM('table Sales'[Sales]),
        _product <> "CQSSL", SUM('table Sales'[Sales]),
        _product <> "DELOP", SUM('table Sales'[Sales]),
        SUMX(
            FILTER('table Sales',
                'table Sales'[Sales] >= MIN('TableCQPT'[Sales]) && 'table Sales'[Sales] <= MAX('TableCQPT'[Sales]) ||
                'table Sales'[Sales] >= MIN('TableCQSSL'[Sales]) && 'table Sales'[Sales] <= MAX('TableCQSSL'[Sales]) ||
                'table Sales'[Sales] >= MIN('TableDELOP'[Sales]) && 'table Sales'[Sales] <= MAX('TableDELOP'[Sales])
            ),
            [Sales]
        )
    )
RETURN _result
 
Anonymous
Not applicable

Hi @lbendlin ,thanks for your quick reply, I will add more.

Hi @mscla ,

As @lbendlin  said, you need to create a disconnected table for slicer.

Please follow these steps:

1.Use the following DAX expression to create a table.

Table = CALCULATETABLE(VALUES('table Sales'[Sales]),'table Sales'[Product] = "CQSSL")

2.Use the following DAX expression to create a measure

Measure = 
VAR _product = SELECTEDVALUE('table Sales'[Product])
VAR _minforSlicer = MIN('Table'[Sales])
VAR _maxforSlicer = MAX('Table'[Sales])
VAR _result = IF(_product <> "CQSSL",
SUM('table Sales'[Sales]),
SUMX(FILTER('table Sales','table Sales'[Sales] >= _minforSlicer && 'table Sales'[Sales] <= _maxforSlicer),[Sales])
)
RETURN _result

3.Final out put

vzhouwenmsft_0-1718860310052.png

vzhouwenmsft_1-1718860340440.png

 

Best Regards,
Wenbin Zhou
If this post helps, please mark me and @lbendlin  as the solution.

 

 

lbendlin
Super User
Super User

You only have a single table. Your slicers will overlay (ie both will be applied together) when they filter your data.

 

Use disconnected tables for your slicer and then use measures as visual filters for your tables A and B.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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