Forum Discussion
Anonymous
6 years agoNot applicable
How to add text condition in Switch
dd Hello - I need to add another condition to this statement, but not sure how. I need to add: allopps-products[status]="open" as one of the conditions. But it won't let me. What do I ...
- Anonymous6 years ago
az38 I got it to work using this:
TRUE(),DATEDIFF(MAX('AllOpps-Products'[Est.Ship]),TODAY(),DAY) > -1 && DATEDIFF(MAX('AllOpps-Products'[Est.Ship]),TODAY(),DAY) > -20, "Passed already"
Anonymous
6 years agoNot applicable
Thanks AZ. az38 But I am getting some strange results. May 29 is two days away, but it is shows "pass already" as a result. The table on the left using the formula. The table on the right is a list of opportunities and their estimated close/ship date.
az38
Community Champion
6 years agoAnonymous
it will work only if you previously add row with 0 value comparision as in my example
DATEDIFF(MAX('AllOpps-Products'[Est.Ship]),TODAY(),DAY)> 0, "0 Days",
- Anonymous6 years agoNot applicable
az38 Hi AZ - Yes, if you are talking about including it in the measure you created, it is there, but that is the result I am getting.
Here is another example. This time in June. It is showing that this opportunity's estimate ship date has "passed already" but it still about 20 days into the future.
- Anonymous6 years agoNot applicable
az38 I got it to work using this:
TRUE(),DATEDIFF(MAX('AllOpps-Products'[Est.Ship]),TODAY(),DAY) > -1 && DATEDIFF(MAX('AllOpps-Products'[Est.Ship]),TODAY(),DAY) > -20, "Passed already"