New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUMIFS multiple dimensions #2061
SUMIFS multiple dimensions #2061
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for investigating, good work.
I wonder about other functions, SUMIF has a sibling functions AVERAGEIF/S and COUNTIF/S. We don't implement AVERAGEIF, but COUNTIF has a similar problem.
I think that rather than fixing old range functions, it would be better to reimplement them. The XObjectExpression
adapter works, but I would like to remove it.
It would require a new method to validate criteria (outlined here).
/// </summary> | ||
/// <param name="rangeExpression">Expression referring to the cell range.</param> | ||
/// <returns>A tuple of column and row counts.</returns> | ||
internal static (int columnCount, int rowCount) GetRangeDimensions(XObjectExpression rangeExpression) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Names of properties of named tuples should be in PascalCase.
@@ -2063,6 +2063,17 @@ public void SumIfs_ReturnsCorrectValues_ReferenceExampleForSumIf1FromMicrosoft(i | |||
} | |||
} | |||
|
|||
[Test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Test]
is not required if there is a [TestCase]
@@ -1783,6 +1782,26 @@ public void SumDateTimeAndNumber() | |||
} | |||
} | |||
|
|||
[Test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Test]
is not required if there is a [TestCase]
909b54d
to
38862f1
Compare
I can have a look at the sibling functions and fix them as a short-term goal.
Don't think I have the capacity for that now, sorry. Hence the goal of this PR is a short term fix. |
Fixes #2041
Add support and applicable errors for input ranges having multilpe dimensions (more than 1 column)