Forum Discussion

gogrizz's avatar
gogrizz
Advocate I
4 years ago
Solved

Cumulative Total on Line Chart with Specific Start Date that Ignores Previous Transactions

I have a table of 280k rows of data (called "Product Timeline") showing all transactions of all companies with all of our products.  It shows the date of transaction, company_ID, product_ID, amount o...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi gogrizz ,

    According to your description, each company has a related adjustment date, you want to use the corresponding adjustment date in the measure.

    I create a sample.

    Here's my solution, create a table listing the adjustment date of each company. Then create relationship between the two tables with the company_ID column.

    Then modify the formula like this:

    Measure =
    CALCULATE (
        SUM ( 'Product Timeline'[amount] ),
        'Product Timeline'[product_ID] = 1,
        FILTER (
            ALLSELECTED ( 'Product Timeline' ),
            'Product Timeline'[date] <= MAX ( 'Product Timeline'[date] )
                && 'Product Timeline'[date] >= RELATED ( 'Adjustment Table'[Adjustment Date] )
        )
    )
    

    Then the visual axis will change according to the company_ID slicer.

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.