Forum Discussion
littlevillage
Jan 02, 2023Iron Contributor
Combinating of sumifs and countifs.
Hi, I Countifs with criterias "BCT", "LT", "232A01" (1). Sumifs of sales for that criterias( 2). The expected result:= (2)/(1) Hope for your help Thank you.
- Jan 03, 2023
It looks like we need to check Position in the current row to receive expected result (row at the bottom)
=IF( OR([@Position] = {"BCT", "LT"}), SUM(SUMIFS([Sales], [ID], [@ID], [Position], {"BCT", "LT"})) / SUM(COUNTIFS([ID], [@ID], [Position], {"BCT", "LT"})), 0 )
Detlef_Lewin
Jan 02, 2023Silver Contributor
=SUM(SUMIFS([Sales],[ID],[@ID],[Position],{"BCT","LT"}))/SUM(COUNTIFS([ID],[@ID],[Position],{"BCT","LT"}))
SergeiBaklan
Jan 03, 2023Diamond Contributor
It looks like we need to check Position in the current row to receive expected result (row at the bottom)
=IF(
OR([@Position] = {"BCT", "LT"}),
SUM(SUMIFS([Sales], [ID], [@ID], [Position], {"BCT", "LT"})) /
SUM(COUNTIFS([ID], [@ID], [Position], {"BCT", "LT"})),
0
)- littlevillageJan 03, 2023Iron Contributor
Thank you very much. It's worked
- SergeiBaklanJan 04, 2023Diamond Contributor
littlevillage , glad to help
- Detlef_LewinJan 03, 2023Silver Contributor
- SergeiBaklanJan 03, 2023Diamond Contributor
Detlef_Lewin , that was only my guess. Logic explained in text and logic in sample are not fully identical.