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.
Hello Everyone!
I'm trying to apply a condition using SWITCH(TRUE() and the last condition is not working at all. When the item age is >181 still is showing HOLD rather then RELEASE and I can't get throug to make the condition show me RELEASE for those > 181, is there something I'm missing on this?
Many thanks!!
Manuel
Measure = SWITCH(TRUE(),
'Table1'[Condition] = "Ace", "Fly",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] < 91, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] > 90, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] < 180, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] > 181, "RELEASE",
"RELEASE"
)
Solved! Go to Solution.
it is correct, because 181 still more then 90, as i sure.
try
Measure = SWITCH(TRUE(),
'Table1'[Condition] = "Ace", "Fly",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] < 90, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] >= 90, "HOLD"&& 'Table2'[Age] <= 180, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] >= 181, "RELEASE",
"RELEASE"
)
and pay attention to values 90 and 180
do not hesitate to give a kudo to useful posts and mark solutions as solution
it is correct, because 181 still more then 90, as i sure.
try
Measure = SWITCH(TRUE(),
'Table1'[Condition] = "Ace", "Fly",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] < 90, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] >= 90, "HOLD"&& 'Table2'[Age] <= 180, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] >= 181, "RELEASE",
"RELEASE"
)
and pay attention to values 90 and 180
do not hesitate to give a kudo to useful posts and mark solutions as solution
Correct
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] > 90, "HOLD"
it covers everything >90
Try one of the two
Measure = SWITCH(TRUE(),
'Table1'[Condition] = "Ace", "Fly",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] < 91, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] > 90 && 'Table2'[Age] < 180, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] > 181, "RELEASE",
"RELEASE"
)
Measure = SWITCH(TRUE(),
'Table1'[Condition] = "Ace", "Fly",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] < 180, "HOLD",
RELATED('Pivot'[Status]) = "Unmatched Standard" && 'Table2'[Age] > 181, "RELEASE",
"RELEASE"
)
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |