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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to build a measure to calculate accumulated default values?

I have a Sales Table that shows the sale pay date and the date that the client in fact payed for the product, called "Sales Off". 

 

If today is greater than the pay date and the Sales Off cell is empty, it means that the client has default. If the Sales Off is greater than the Pay Date, it means that the client defaulted in the past.

 

I want to build a measure that shows all accumulated amount that has already been defaulted at some date (present or past). How can I do that?

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous 

Do share some sample data to help people that want to help you.  Where is the inf for the amount? Try this:

Measure =
VAR today_ =
    TODAY ()
RETURN
    CALCULATE (
        SUM ( Table1[Amount] ),
        FILTER (
            ALL ( Table1[Pay date], Table1[Sales off] ),
            (ISBLANK ( Table1[Sales off] ) && Table1[Pay date] < today_) || (Table1[Sales off] > Table1[Pay date])
        )
    )

  

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

Do share some sample data to help people that want to help you.  Where is the inf for the amount? Try this:

Measure =
VAR today_ =
    TODAY ()
RETURN
    CALCULATE (
        SUM ( Table1[Amount] ),
        FILTER (
            ALL ( Table1[Pay date], Table1[Sales off] ),
            (ISBLANK ( Table1[Sales off] ) && Table1[Pay date] < today_) || (Table1[Sales off] > Table1[Pay date])
        )
    )

  

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.