Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
RichOB
Post Partisan
Post Partisan

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 and long-term.

When the End_date is blank, I need today's date to be inserted.

If a tenant is active for a year, they would be counted as 1 for each quarter.

The financial year runs Apr-Mar.

 

Using the table below, it should read as Q1 = 8. Q2 = 10. Q3 = 12. Q4 = 10.

 

Tenant_IDPropertyStart_DateEnd_DateStatus
11 marble way 01/04/2023 Current
22 spring drive01/04/2022 Current
35 manor close01/04/2021 Current
47 queen road01/04/2020 Current
71 ocean ave01/04/202401/05/2024Historic
81 ocean ave02/05/2024 Current
92 ocean ave10/04/202410/10/024Historic
02 ocean ave11/10/2024 Current
113 ocean ave01/04/2024 Current
121 park way01/07/2024 Current
132 park way01/07/202401/08/2024Historic
143 park way02/08/2024 Current
151 main road01/11/202410/11/2024Historic
161 main road11/11/2024 Current

 

Thanks for your help!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

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
            )
        )

danextian_0-1750766220082.png

Please see the attached pbix. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

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
            )
        )

danextian_0-1750766220082.png

Please see the attached pbix. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
v-tejrama
Community Support
Community Support

Hi @RichOB ,
Thanks for reaching out to the Microsoft fabric community forum.

 

I have tested your scenario in Power BI and was able to reproduce the expected results for active tenants per quarter (Q1 = 8, Q2 = 10, Q3 = 12, Q4 = 10) exactly as you mentioned.

 

Here’s how I achieved it:

 

First, I created a proper Date table covering your financial year (Apr to Mar) and marked it as a date table.

Then, I created an inactive one-to-many relationship between the Date table and your Tenants table (Date → Start_Date) because we needed to handle the date logic manually in the DAX formula.

 

For the active tenant calculation, I used this DAX measure:

 

Active Tenants =
VAR SelectedDate = MAX(DateTable[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(Tenants[Tenant_ID]),
FILTER(
ALL(Tenants),
Tenants[Start_Date] <= SelectedDate &&
(ISBLANK(Tenants[End_Date]) || Tenants[End_Date] >= SelectedDate)
)
)

 

Finally, I used a Matrix visual with Quarter on Rows and this measure in Values, and filtered by the required financial year. It gave me the correct result matching your expected output.

If the response has addressed your query, please  "Accept it as a solution" and give a "Kudos"  so other members can easily find it.


Best Regards,
Tejaswi.
Community Support

 

Hi @RichOB,

 

I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

 

If the response answered your query, kindly “Accept as Solution” and Give “Kudos” to help others in the community benefit from it as well.

 

Thank you.

Tejaswi.

 

Hi @RichOB ,

 

I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.

 

Thank you.

 

Hi @RichOB ,

 

May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.