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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
strikw
Helper I
Helper I

Error in calculation to return larger value of a column

Hello,

I'm having a problem calculating a result. I need to return values greater than the field "Valor Apostado", but there is no way I can call this column direct in the formula. And when I take the somatatory from this field gives this error:

 

The function 'CALCULATE' has been used in a True / False expression that is used as a table filter expression. This is not allowed.

.Jogos Ganhos = Calculate ( Count (Tips[Resultado]); Tips [Resultado] > Tips[.Total Apostado])

 

Currently the formula is as follows:

.Jogos Ganhos = Calculate ( Count (Tips[Resultado]); Tips [Resultado] > 1)

 

I need to remove this "1" and put the table column Tips[Valor Aposta] 

 

I do not know how to do. If anyone can help me.

Thank you.

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi

Error occurs in your formula due to grammar error.

try this formula 

Jogos Ganhos = CALCULATE(COUNT(Sheet1[Resultado]),FILTER(Sheet1,[Resultado]>[Valor Aposta]))

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi

Error occurs in your formula due to grammar error.

try this formula 

Jogos Ganhos = CALCULATE(COUNT(Sheet1[Resultado]),FILTER(Sheet1,[Resultado]>[Valor Aposta]))

 

Best Regards

Maggie

Hello

It worked, thank you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.