Forum Discussion
Anonymous
4 years agoNot applicable
Multiple condition
Hello Dear Community, I hope you are well. I have a small problem. I have created a column that gives me categories based on the content of a cell in another column. Here is the formula : GBU/...
- 4 years ago
Is this better?
GBU/GF = VAR ProdElements = CALCULATETABLE ( VALUES ( Example[Element] ), ALLEXCEPT ( Example, Example[Product_ID] ), Example[Dimension] = "GMC" ) VAR Elements = FILTER ( { "CHC", "SPC", "VAC", "GENMED", "GLOBAL" }, NOT ISEMPTY ( FILTER ( ProdElements, CONTAINSSTRING ( Example[Element], [Value] ) ) ) ) RETURN SWITCH ( TRUE (), COUNTROWS ( Elements ) = 2 && "GLOBAL" IN Elements, EXCEPT ( Elements, { "GLOBAL" } ), COUNTROWS ( Elements ) > 1, "MBC", COUNTROWS ( Elements ) = 1, Elements, "GLOBAL" )
Anonymous
4 years agoNot applicable
Hello AlexisOlson,
Thank you very much for your time and answer.
The total amount is 4116.
Is it working for you ?
AlexisOlson
4 years agoSuper User
Not sure where you're getting that number from. The file you provided has 4,455 distinct Product_ID values.