Forum Discussion

Yknoff1's avatar
Yknoff1
New Member
1 year ago
Solved

Return Values Before a Certain Date

Hello, I'm having some difficulties creating a visual that will show me some totals of line items from a contract. Some line items get added to a contract later on and I would like to be able to select a  previous payment and only show the items that would have existed at that time of that payment.

 

The result I get in the top table only shows 1 line, the line that had an amount payable in payment 3, however I would like to show all lines that were created at the time of payment 3 (lines 1-4) since the payment date was Sep 15. 

 

 

This is the measure I am using:

 

Contract Tender Value =
VAR Paymentdate = CALCULATE(MIN(Payment[Created On]))
RETURN

CALCULATE(
    SUM('Line Items'[Amount]),
'Line Items'[Change Order] = FALSE() &&
'Line Items'[Created On] <= Paymentdate
)

 

These are the realtionships in the table:

 

 

Thanks for any help. 

7 Replies

  • Hi,

    Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.