Forum Discussion

larrylob's avatar
larrylob
Regular Visitor
5 years ago
Solved

Count if a rows range falls within another range

Hello,   I have looked around and have not found an answer to my problem and hope someone could help me.   Right now i have a few different tables from different entities that have constraints th...
  • AlexisOlson's avatar
    5 years ago

    You can add a calculated column to your Sections table like this:

    # Constraints =
    VAR SectionStart = Sections[Mile Start]
    VAR SectionEnd = Sections[Mile End]
    RETURN
        COUNTROWS (
            FILTER (
                Constraints,
                Constraints[Mile Start] < SectionEnd &&
                Constraints[Mile End] > SectionStart
            )
        )