Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hey there, seems like I need your help once more.
First, what you need to know; there is a table describing phases (A to D), and their respective thresholds (most of them start at 0.8 or 80% to enter "Yellow State").
There is a measure calculated, example for Start B phase (Project Name context; Each project has its own Start B phase: the measure displays whether its above or below a given threshold)
This conditional formatting thing is based on "Format" tab. But, it has to be formatted based on the table abovementioned.
Here's what I did:
VAR phase_b_condition =
How to Pull a corresponding value so it knows it is Phase B?
VAR phase_b_flags =
SWITCH ( [phase b Readiness],
[phase b Readiness] < phase_b_condition, "FlagLow",
[phase b Readiness] > phase_b_condition, "FlagHigh",
"FlagMedium"
)
Question as is in the code chunk:
- How to retrieve a corresponding threshold value for condition from a table that has no relationships with anything else, so I can compare it with the measure result.
I just don't have enough experience to deal with it.
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, I create a sample.
Table 1:
Table 2:
The two tables don't have relationship, now in my understanding, you want to get which range of Table 2 is in PhaseB according to Table 1, here's my solution, create a measure:
Measure =
VAR MAX_phase_b_condition =
MAXX (
FILTER ( 'Table 1', 'Table 1'[Phase] = "Start B" ),
'Table 1'[Max_Threshold]
)
VAR MIN_phase_b_condition =
MAXX (
FILTER ( 'Table 1', 'Table 1'[Phase] = "Start B" ),
'Table 1'[Min_Threshold]
)
RETURN
SWITCH (
TRUE,
MAX ( 'Table 2'[phase b Readiness] ) < MIN_phase_b_condition, "FlagLow",
MAX ( 'Table 2'[phase b Readiness] ) > MAX_phase_b_condition, "FlagHigh",
"FlagMedium"
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, I create a sample.
Table 1:
Table 2:
The two tables don't have relationship, now in my understanding, you want to get which range of Table 2 is in PhaseB according to Table 1, here's my solution, create a measure:
Measure =
VAR MAX_phase_b_condition =
MAXX (
FILTER ( 'Table 1', 'Table 1'[Phase] = "Start B" ),
'Table 1'[Max_Threshold]
)
VAR MIN_phase_b_condition =
MAXX (
FILTER ( 'Table 1', 'Table 1'[Phase] = "Start B" ),
'Table 1'[Min_Threshold]
)
RETURN
SWITCH (
TRUE,
MAX ( 'Table 2'[phase b Readiness] ) < MIN_phase_b_condition, "FlagLow",
MAX ( 'Table 2'[phase b Readiness] ) > MAX_phase_b_condition, "FlagHigh",
"FlagMedium"
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Note: Table 2 is a measure. I will also check if it's gonna affect the overall result
Hey there! I am sorry for the long reply. I'll try it today and will let you know it if it'll work!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |