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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
HopeThomas456
Frequent Visitor

Rolling Sum of area with start and end date - DAX

Hi community! 

I am working on caculating the active area of a building depending on its start and end month. If the area as a NULL end month then that means the space is permanent. If the space has a start month of Jan and and end date in May then that space is not added in July or the months moving forward. This is one of the DAX formate I am working on and it is not giving the correct output. Is there something I am missing? 

 

Rolling Area Sum =
CALCULATE(
    SUM('JoinData'[Area]),
    FILTER(
        ALL('Calendar'),
        'Calendar'[Date] >= MIN('JoinData'[Allocation Data.Planned Start Date])
        && (
            'Calendar'[Date] <= MAX('JoinData'[Allocation Data.Planned End Date])
            || ISBLANK(MAX('JoinData'[Allocation Data.Planned End Date]))
        )
    )
)
 
 

Thank you so much for all of yalls help!! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @HopeThomas456 ,

Any update on this? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @HopeThomas456 ,

Any update on this? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

HopeThomas456
Frequent Visitor

Thank you for your replay @Jihwan_Kim 

I tried the DAX measure above, but I noticed that it does not count into Area. 

When I did this itdid not increase the rolling sum. Is there another way around this? 

HopeThomas456_1-1699981209991.png

 

 

Hi,

Please share your sample pbix file's link.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1699934326511.png

 

Jihwan_Kim_1-1699934488247.png

 

Area count measure: =
CALCULATE (
    COUNTROWS ( JoinData ),
    FILTER (
        JoinData,
        JoinData[Allocation Data.Planned Start Date] <= MAX ( 'Calendar'[Date] )
            && OR (
                ISBLANK ( JoinData[Allocation Data.Planned End Date] ),
                JoinData[Allocation Data.Planned End Date] >= MIN ( 'Calendar'[Date] )
            )
    )
)

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors