topic Re: Calculate "opposite" in Desktop
https://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1752188#M688653
<P><LI-USER uid="254859"></LI-USER> It is not correctly created the query. <BR /><BR />Try to do something like this<BR /><BR /></P><P> </P><LI-CODE lang="markup">query= CALCULATE(SUM(yourtable[column1]), FILTER(yourtable, yourtable[column1] = "False" && yourtable[column2] >= 1000 && yourtable[column3] = "Value"))</LI-CODE><P> </P><P> </P><P>This will give to you the sum of column 1 when the row has the 3 condiciones (beucase i put an AND = &&)<BR /><BR />if you want, you can put OR = || <BR /><BR /><BR /></P>Mon, 29 Mar 2021 15:03:42 GMTdobregon2021-03-29T15:03:42ZCalculate "opposite"
https://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1749848#M687987
<P>Hi,</P><P> </P><P>I have a calculate function in the format of:</P><P> </P><P>CALCULATE(SUM(COLUMN1),<BR />FILTER(COLUMN1 = FALSE),</P><P>FILTER (COLUMN2 >= 1000),</P><P>FILTER(COLUMN3 = VALUE))</P><P> </P><P>Can someone help me understand this more deeply:</P><P> </P><P>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. </P><P>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.</P><P> </P><P>Thanks for the help!</P>Sun, 28 Mar 2021 08:10:30 GMThttps://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1749848#M687987CarlsBerg9992021-03-28T08:10:30ZRe: Calculate "opposite"
https://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1752169#M688647
<P><LI-USER uid="254859"></LI-USER>,</P>
<P> </P>
<P>See the link below for a detailed explanation of CALCULATE. The filter arguments are intersected (merged with the AND operator).</P>
<P> </P>
<P><A href="https://dax.guide/calculate/" target="_self">https://dax.guide/calculate/</A> </P>
<P> </P>
<P>Would you be able to provide an example of the wrong result (and underlying data) when doing the opposite calculation?</P>Mon, 29 Mar 2021 14:53:00 GMThttps://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1752169#M688647DataInsights2021-03-29T14:53:00ZRe: Calculate "opposite"
https://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1752188#M688653
<P><LI-USER uid="254859"></LI-USER> It is not correctly created the query. <BR /><BR />Try to do something like this<BR /><BR /></P><P> </P><LI-CODE lang="markup">query= CALCULATE(SUM(yourtable[column1]), FILTER(yourtable, yourtable[column1] = "False" && yourtable[column2] >= 1000 && yourtable[column3] = "Value"))</LI-CODE><P> </P><P> </P><P>This will give to you the sum of column 1 when the row has the 3 condiciones (beucase i put an AND = &&)<BR /><BR />if you want, you can put OR = || <BR /><BR /><BR /></P>Mon, 29 Mar 2021 15:03:42 GMThttps://community.powerbi.com/t5/Desktop/Calculate-quot-opposite-quot/m-p/1752188#M688653dobregon2021-03-29T15:03:42Z