Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Help with dax measure

Hi, I really apreciate if any one can help me with this problem   ID School Level Service Qty 101 primary school Lunch 20 101 primary school Breakfast 18 101 primary school s...
  • Applicable88's avatar
    4 years ago

    Anonymous , as I understood the ID school and schoollevel belonging together, so you can summarize them. Please take a look at Measure:

     

     

    Measure = sumx( ADDCOLUMNS(SUMMARIZE(Tabelle1,Tabelle1[ID School],Tabelle1[Level]),"Total", calculate(MAX(Tabelle1[Qty]))),[Total])
     
    Hope it helps.
    Best regard. 

     

  • Natallia_23's avatar
    4 years ago

    Hello,

     

    Max = CALCULATE(MAX(Table1[Qty]),ALLEXCEPT(Table1,Table1[ID],Table1[School Level]))
     
    Result =
    var x = SUMMARIZECOLUMNS(Table1[ID],Table1[School Level], "res", [Max] )
    return sumx(x, [res])