Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chaoui04
Frequent Visitor

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[Montant HT]>20, Ventes[Date]= "2017" ) , Ventes[Montant HT])
 
2 ACCEPTED SOLUTIONS
FrankAT
Community Champion
Community Champion

Hi @chaoui04 

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)

View solution in original post

v-stephen-msft
Community Support
Community Support

Hi @chaoui04 ,

 

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.

11.png

 

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.

 

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @chaoui04 ,

 

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.

11.png

 

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.

 

FrankAT
Community Champion
Community Champion

Hi @chaoui04 

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)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.