Forum Discussion

Kfausch's avatar
Kfausch
Helper II
4 years ago
Solved

Table Totals Incorrect

Hello,   I am struggling with a tables totals. I am not sure the correct way to calculate this so both the line and total values are correct.   I have two tables; 'Item Ledger' which stores the c...
  • johnt75's avatar
    4 years ago

    You could rename your current measure to something like Waste Line Item then create a measure like

    Waste $ =
    IF (
        ISINSCOPE ( 'Table'[No] ),
        [Waste Line Item],
        SUMX (
            ADDCOLUMNS (
                SUMMARIZE ( 'Table', 'Date'[Date], 'Table'[No] ),
                "@waste", [Waste Line Item]
            ),
            [@waste]
        )
    )
    

    where the columns in the SUMMARIZE are the same columns from the left hand side of your table visual.