Forum Discussion

jjohnson1990's avatar
jjohnson1990
Frequent Visitor
6 years ago
Solved

Sum for filtered in distinct value

HELLO ALL, I currently have a table with below for columns. Sec SECTORDATE DEP DLY MIN PAX DEP DELAY CODE 5 1/1/20 0:00 20 167 15 - PH 8 1/1/20 0:00 85 167 91 - RL 10 1/1...
  • jjohnson1990's avatar
    jjohnson1990
    6 years ago

    Hello az38 , thanks for the revert. i had run your code, it give me a constant value regardless of date 

    On modifying the code slightly i.e. removing the filter expression ALL(Query), this gave me the correct output as expected

     

    Total PAX = CALCULATE(SUMX(SUMMARIZE('Query1','Query1'[Sec], "Total PAX", MAX(Query1[PAX])), [Total PAX]))