Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculating totals without row context limiting data

I've been attempting to find a solution for this for a while now and haven't been able to.   I'm trying to get the values for the Equipment_Days2 column to read: 14    associated with equipment_qt...
  • AlexisOlson's avatar
    4 years ago

    This might get you a bit closer.

    Equipment_Days2 =
    VAR CurrQty = CalculatedDaysTable[equipment_qty]
    RETURN
        CALCULATE (
            SUM ( CalculatedDaysTable[DaysValue] ),
            CalculatedDaysTable[equipment_qty] <= CurrQty,
            CalculatedDaysTable[equipment_uom] = "Daily"
        )

     

    You used ALL on the entire table, which removes the context from all columns. I'd recommend only using it for specific columns unless you really do want to get rid of all the filtering.