Forum Discussion

RichOB's avatar
RichOB
Post Partisan
1 year ago
Solved

Active numbers per quarter

Hi, I need to obatin the quarterly figures for active tenants per quarter. I have a date table with the quarter already.   In this scenario: I have properties where tenants have stayed short-term ...
  • danextian's avatar
    1 year ago

    Hi RichOB 

     

    I'm seeing a different number for Q4

    Count by Time Period = 
    VAR StartDate =
        MIN ( Dates[Date] )
    VAR EndDate =
        MAX ( Dates[Date] )
    RETURN
        COUNTROWS (
            FILTER (
                Tenant,
                Tenant[Start_Date] <= EndDate
                    && COALESCE ( Tenant[End_Date], TODAY() ) >= StartDate
                )
            )
    

    Please see the attached pbix.