Forum Discussion
Need help on DAX
- 4 years ago
Check that the Material has no false value in its group.
Output = NOT ( FALSE IN CALCULATETABLE ( VALUES ( Materials[Check] ), ALLEXCEPT ( Materials, Materials[Material] ) ) )Slightly less intuitive but simpler:
Output = CALCULATE ( SELECTEDVALUE ( Materials[Check] ), ALLEXCEPT ( Materials, Materials[Material] ) ) - 4 years ago
Yes, the second one will return blanks when multiple values are present. These get coerced into FALSE values if the column type is a logical boolean.
To work with "Yes" / "No", I think you could just add an argument to SELECTVALUE for what to return instead of blank when there are multiple values. That is, SELECTEDVALUE ( Materials[Check], "No" ).
Check that the Material has no false value in its group.
Output =
NOT (
FALSE
IN CALCULATETABLE (
VALUES ( Materials[Check] ),
ALLEXCEPT ( Materials, Materials[Material] )
)
)
Slightly less intuitive but simpler:
Output =
CALCULATE (
SELECTEDVALUE ( Materials[Check] ),
ALLEXCEPT ( Materials, Materials[Material] )
)- SarathB24 years agoFrequent Visitor
Thanks a lot AlexisOlson . Great solution.It's working, I will check it in my real scenorio.
Greatful for quick response. - SarathB24 years agoFrequent Visitor
Hi AlexisOlson ,
In case of something like "YES" or "NO" instead of "True" or "False" , first solution is working and Second solution is not giving expected result... Right?Thanks & Regards,
Sarath.
- AlexisOlson4 years agoSuper User
Yes, the second one will return blanks when multiple values are present. These get coerced into FALSE values if the column type is a logical boolean.
To work with "Yes" / "No", I think you could just add an argument to SELECTVALUE for what to return instead of blank when there are multiple values. That is, SELECTEDVALUE ( Materials[Check], "No" ).
- SarathB24 years agoFrequent Visitor
Okay , Super thanks for your response AlexisOlson .