Forum Discussion
Conditional column with does NOT include and OR criteria
Hi Anonymous ,
I also tried other custom visuals, like Smart Filter,Attribute Slicer. However, I think it might be the best way to use the visual of Text Filter.
And I found a blog that create a new table manually as a slicer to filter data. I don't know if it works for your situation. Maybe you can get some ideas from it.
https://blog.pragmaticworks.com/power-bi-problem-design-solution-text-search-slicer
Hi v-xuding-msft ,
thansk for the link, that seems to be pretty much my case!
I followed the example and entered correctly tha DAX and everything, but when I add the new measure with the DAX to the table (and I should get a TRUE/FALSE values column) I get the following error instead:
MdxScript(Model) (6, 9) Calculation error in measure 'Sheet1 (2)'[IsFiltered]: The function SUMX cannot work with values of type Boolean.
I think it's because the SUMX clearly expect numbers, while I have text data - which is in line with what suggested in the example of the video you linked.
Any hint ?
The full DAX is:
IsFiltered = IF(
SUMX(RawMat;
(FIND
(RawMat[Raw Materials];
MAX('Sheet1 (2)'[Product Lev 1]);;0)) > 0)
;"True"
;"False")
Thansk again!!
- v-xuding-msft6 years ago
Community Support
Hi Anonymous ,
Sorry for late back. Have you resolved the problem? If not, please try like this:
IsFiltered = IF ( SUMX ( RawMat; FIND ( RawMat[Raw Materials]; MAX ( 'Sheet1 (2)'[Product Lev 1] );; 0 ) ) > 0; "True"; "False" ) - Anonymous6 years agoNot applicable
Hi v-xuding-msft ,
thanks - I just tried it. Still same problem, does not work because SUMX cannot work with boleeans. Strange since in the example in the video you shared with me, that is exactly what they seem to be doing....
- v-xuding-msft6 years ago
Community Support
Hi Anonymous ,
I create a new sample to test that formula. It works fine. I think the error in your report might be caused by the position of parentheses. Maybe ">0" is contained in the function of SUMX. You could format it using the tool of DAX Formatter by SQLBI firstly. http://www.daxformatter.com/
And please share a few screenshots. We will understand clearly.