cancel
Showing results for
Did you mean:
Helper V

## Calculate "opposite"

Hi,

I have a calculate function in the format of:

CALCULATE(SUM(COLUMN1),
FILTER(COLUMN1 = FALSE),

FILTER (COLUMN2 >= 1000),

FILTER(COLUMN3 = VALUE))

Can someone help me understand this more deeply:

1. What is the order in which the filters are applied? I understand that this is kind of like "sum" if all of the following are true.

2. How do i do the "opposite" of this? In my data set, if i put the opposite to just the filters, the result is wrong.

Thanks for the help!

1 ACCEPTED SOLUTION
Post Prodigy

@CarlsBerg999  It is not correctly created the query.

Try to do something like this

``query= CALCULATE(SUM(yourtable[column1]), FILTER(yourtable, yourtable[column1] = "False" && yourtable[column2] >= 1000 && yourtable[column3] = "Value"))``

This will give to you the sum of column 1 when the row has the 3 condiciones (beucase i put an AND = &&)

if you want, you can put OR = ||

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
2 REPLIES 2
Post Prodigy

@CarlsBerg999  It is not correctly created the query.

Try to do something like this

``query= CALCULATE(SUM(yourtable[column1]), FILTER(yourtable, yourtable[column1] = "False" && yourtable[column2] >= 1000 && yourtable[column3] = "Value"))``

This will give to you the sum of column 1 when the row has the 3 condiciones (beucase i put an AND = &&)

if you want, you can put OR = ||

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Super User

See the link below for a detailed explanation of CALCULATE. The filter arguments are intersected (merged with the AND operator).

Would you be able to provide an example of the wrong result (and underlying data) when doing the opposite calculation?

Proud to be a Super User!

Announcements

#### Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

#### Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

#### Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors