'MicroStrategy add two conditions in IF statement

I want to create a new Metric, using MicroStrategy Metric Editor, to check two conditions:

1 is progress_days > complete_date
2 is Status column is = In Progress

if both conditions are met, then Red, else Green

enter image description here

it looks like MicroStrategy doesn't support it, please advise.



Solution 1:[1]

You need to wrap your two conditions in an And function.

Solution 2:[2]

what I find out today is I can't mix a metric with a attribute in the AND logic, and I need to use double quote instead of single quote.

use single Case statement can handle 2 or more conditions

Case(((today@ID>[Due Date]@ID)And(Status@ID="Done")), "Green", ((today@ID>[Due Date]@ID)And(Status@ID="In Progress")), "Red", "Progress")

Solution 3:[3]

Difference between Case and If

The If function is very similar to the Case function. Each function takes a condition as an argument and returns a value depending on whether the condition is true or not. The Case function can evaluate multiple conditional arguments, while the If function can only evaluate one condition.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 paulbailey
Solution 2
Solution 3 Farid Bouregba