Forum Discussion
SUMIFS with multiple columns with DAX
- 4 years ago
You can't have two columns with the same name, so I change the first to "Colour" and second to "Code":
Result = VAR SumIfs = CALCULATE ( SUM ( Table1[Unique Count] ), ALLEXCEPT ( Table1, Table1[Item], Table1[Code] ) ) RETURN IF ( Table1[Code] = "Not Pair" || SumIfs = 1, Table1[Colour], "Not Okay" ) - 4 years ago
Hi Saxon10 ,
Please add the ROUND function to the formula of AlexisOlson.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Saxon10 , Try a new column like
new col =
var _1 = countx(filter(Table, [Item] && earlier([Item]) && [Colour Code] <> "Not Pair"), [Item])
return
if([Colour Code] = "Not Pair" || isblank(_1) || _1=1, [Colour], "Not Okay")
I am receeving error if I apply your code "The syntax for 'Table' is incorrect. (DAX(var _1 = countx(filter(Table, [Item] && earlier([Item]) && [Colour Code] <> "Not Pair"), [Item])returnif([Colour Code] = "Not Pair" || isblank(_1) || _1=1, [Colour Code], "Not Okay"))).