Forum Discussion
Conditional Appearance of Text Box?
- 9 years ago
I was on a mission and couldn't stop. The following will account for multiple selections. Given our individual handling of the fruit, I chose to give the same message whether zero or multiple selections were made.
Warning Message = IF(AND(ISFILTERED(tblFruit[Name]),HASONEVALUE(tblFruit[Name])),IF(OR(VALUES(tblFruit[Name])="Apples",OR(VALUES(tblFruit[Name])="Grapes",VALUES(tblFruit[Name])="Pears")),"Wash " & VALUES(tblFruit[Name]) & " before eating.",""),"PICK ONE FRUIT!")
BOLD is still new from the original.
IF the fruit has been filtered and IF there is only 1 fruit value, go ahead and put up a message. Otherwise (zero or multiple selected), tell the user to make a SINGLE selection.
Not trying to be coy by disguising some info below.
Thanks again for the help.
The first right parenthesis should be after the right square bracket, not at the end.
Like this:
Message = IF(VALUES('Master Rate Date'[Product])="something","something else")
- pschommer9 years agoHelper II
I was on a mission and couldn't stop. The following will account for multiple selections. Given our individual handling of the fruit, I chose to give the same message whether zero or multiple selections were made.
Warning Message = IF(AND(ISFILTERED(tblFruit[Name]),HASONEVALUE(tblFruit[Name])),IF(OR(VALUES(tblFruit[Name])="Apples",OR(VALUES(tblFruit[Name])="Grapes",VALUES(tblFruit[Name])="Pears")),"Wash " & VALUES(tblFruit[Name]) & " before eating.",""),"PICK ONE FRUIT!")
BOLD is still new from the original.
IF the fruit has been filtered and IF there is only 1 fruit value, go ahead and put up a message. Otherwise (zero or multiple selected), tell the user to make a SINGLE selection.
- Anonymous9 years agoNot applicable
You possess Harry Potter like wizardry.
One last quesition...
Is there any way NOT to have what appears to be a broken tile show when the product is not selected?
- pschommer9 years agoHelper II
Since you said LAST QUESTION, I took another quick look.
If you wrap the existing defintion in another IF statement checking first to see whether the fruit name is filtered, that works for me. It's getting a little long now, but here is what it looks like:
Warning Message = IF(ISFILTERED(tblFruit[Name]),IF(OR(VALUES(tblFruit[Name])="Apples",OR(VALUES(tblFruit[Name])="Grapes",VALUES(tblFruit[Name])="Pears")),"Wash " & VALUES(tblFruit[Name]) & " before eating.",""),"PICK A FRUIT!")
The new part is BOLD. We're saying, "If the slicer is filtered, go ahead and figure out which message to put up." If nothing is selected, yell at the user. You may want to change that last message, but I prefer the direct approach.
It still doesn't work with multiple selections, but you said no more questions... :smileyhappy:
- Anonymous9 years agoNot applicable
Awesome! Thanks for all the help, it is greatly appreciated.