Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamic Dates & Value Difference

Hello,   I want to provide a comparison of sales value as of each date.    Example: Report Date Contracts Value 16/06/2021 10500 20/06/2021 13100 29/06/2021 9800 ...etc ...et...
  • daxer-almighty's avatar
    5 years ago
    [Positive Diffs Total] =
    SUMX(
        SUMMARIZE(
            FactTable,
            // This CustomerID must be
            // unique. It's the key to
            // the Customer dimension.
            Customers[CustomerID]
        ),
        MAX(
            // blank is treated as 0
            // but will not display
            BLANK(), 
            [New Contracts Financial Reporting] 
        )
    )
    
    [Negative Diffs Total] =
    SUMX(
        SUMMARIZE(
            FactTable,
            // This CustomerID must be
            // unique. It's the key to
            // the Customer dimension.
            Customers[CustomerID]
        ),
        MIN(
            // blank is treated as 0
            // but will not display
            BLANK(), 
            [New Contracts Financial Reporting] 
        )
    )