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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Use one slicer to set 2 thresholds

Thanks for wanting to understand my problem!

 

I would like to have one slicer that allows you to select 'normal' or strict'. This slicer will determine 2 thresholds that combine to determine whether quality is good or poor. Only one threshold needs to be exceeded for quality to be poor.

 

Normal should set Poor threshold A to >500 and Poor threshold B to >10%.

Strict should set Poor threshold A to >400 and Poor threshold B to >5%.

i.e. lower values are better

 

The quality column for my desired outcome would look like this:

Slicer set to Normal -

Person

Value A

Value B

Quality

1

 100

 1%

Good

2

 425

 3%

Good

3

 450

 8%

Good

4

550

11%

Poor

 

Slicer set to Strict-

Person

Value A

Value B

Quality

1

 100

 1%

Good

2

 425

 3%

Poor

3

 450

 8%

Poor

4

550

11%

Poor

 

This will allow me to say how many people achieved good and poor for each of the threshold pairs.

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, try with this:

 

Create a New Table -- You can do with Enter Data  (DONT RELATED IT)

Img33.png

 

Next Step : Create a Measure

 

Quality =
VAR ValueA_Type =
    SELECTEDVALUE ( 'Type'[Value A] )
VAR ValueB_Type =
    SELECTEDVALUE ( 'Type'[Value B] )
RETURN
    IF (
        HASONEVALUE ( 'Type'[Type] ),
        SWITCH (
            TRUE (),
            SELECTEDVALUE ( 'Table-Mash'[Value A] ) > ValueA_Type
                || SELECTEDVALUE ( 'Table-Mash'[Value B] ) > ValueB_Type; "Poor",
            "Good"
        )
    )

 

Show.png

Regards

 

Victor

 




Lima - Peru
RMDNA
Solution Sage
Solution Sage

Hi @Anonymous,

 

I was really curious about your problem, so I found an incredibly hacky way to solve it, but it's only a proof of concept - not scalable at all.

 

I took your table and duplicated the rows to assign each a threshold value:

 

a.PNG

 

Next, I created a Quality column. I'd usually use SWITCH() for nested IF()s, but I couldn't figure that out.

 

Quality =
-- Normal
IF (
    'TS_Table'[Threshold] = "Normal",
    IF (
        'TS_Table'[Value A] < 500,
        IF ( 'TS_Table'[Value B] < 0.10"Good""Poor" ),
        "Poor"
    ),
    -- Strict
    IF (
        'TS_Table'[Value A] < 400,
        IF ( 'TS_Table'[Value B] < 0.05"Good""Poor" ),
        "Poor"
    )
)

 

With quality added to the table, the threshold slicer works:

n.PNGs.PNG

 

The ideal solution is to avoid duplicating rows, and I'm sure the calculation can be optimized, but the concept is there.

Anonymous
Not applicable

Thank you for your efforts @RMDNA!

 

If it wasn't for my 350,000 lines of data this would work perfectly fine.

 

I'd appreciate your view on whether you think the disconnect slicer concept (explained here) would work?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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