Forum Discussion

lg01's avatar
lg01
Advocate III
1 year ago
Solved

Aggregation over facility

See sample below. I have a table with data from different facilities. These facilities have multiple "production tables" and they also have special equipments (water pumps) with a defined gallons cap...
  • Bibiano_Geraldo's avatar
    1 year ago

    Hi lg01 ,

    You can achieve your goal by this DAX calculated column:

    Capacity Per Facility (gal) = 
    CALCULATE (
        SUMX (
            VALUES ( 'Sample Table'[water_pump_id] ), 
            FIRSTNONBLANK ( 'Sample Table'[water_pump_capacity (gal)], 0 )
        ),
        ALLEXCEPT ( 'Sample Table', 'Sample Table'[facility_id] )
    )

     

    Now your table will look like this: