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.
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" )
- Saxon104 years ago
Post Prodigy
Thanks for your respones and sorry for the late reply.
Your solution almost working fine but I recevied incorrect result were the same itms has repeat multiple times- AlexisOlson4 years ago
Super User
I'm guessing you have some kind of rounding error so that Unique Count isn't adding up to exactly 1.
I don't understand why you have duplicated rows, so it's hard to suggest a fix.
- v-kkf-msft4 years ago
Community Support
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.
- Saxon104 years ago
Post Prodigy
Thanks for your reply and your solution.
Your solution working well. Thank you.