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.
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.
@Anonymous
Hi, try with this:
Create a New Table -- You can do with Enter Data (DONT RELATED IT)
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" ) )
Regards
Victor
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:
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:
The ideal solution is to avoid duplicating rows, and I'm sure the calculation can be optimized, but the concept is there.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |