Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

sumx calculate table

Hello, i can't applicate this mesure.  Can you helm me please because i have an error : The expression specified in the quey is not table expression : Training = sumx(CALCULATETABLE(Ventes, Ventes...
  • FrankAT's avatar
    5 years ago

    Hi Anonymous 

    try the following measure:

     

    SUMX(FILTER( Ventes, Ventes[Montant HT]>20, Ventes[Date]= "2017" ), Ventes[Montant HT])

     

    With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
    FrankAT (Proud to be a Datanaut)

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    I'm sorry if my question seems to be stupid 😆, but may you confirm that the formula is written as a "New Measure" and not as "New table" ?

     

    The SUMX returns the sum of an expression evaluated for each row in a table instead of returning a table.

     

    Just replace it with a measure.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.