topic Measure to sum column with multiple filters in Desktop
https://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257269#M114688
<P>I want to sum the absolute value of column "Saldo" in table "Balancete Geral", whose column "Conta" is:</P><UL><LI>11</LI><LI>12</LI><LI>13</LI></UL><P>In a single measure.</P><P> </P><P>This can be achieved with Calculate, like:</P><PRE>Measure =
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) );
BalanceteGeral[Conta] = 11
)+
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) );
BalanceteGeral[Conta] = 12
)+
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) );
BalanceteGeral[Conta] = 13
)</PRE><P>But, isn't there a more efficient way to use the CALCULATE filter to consider 3 or more filters?</P><P>I could use OR in a single filter, but it only accepts two arguments...</P>Fri, 22 Sep 2017 10:22:49 GMTwebportal2017-09-22T10:22:49ZMeasure to sum column with multiple filters
https://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257269#M114688
<P>I want to sum the absolute value of column "Saldo" in table "Balancete Geral", whose column "Conta" is:</P><UL><LI>11</LI><LI>12</LI><LI>13</LI></UL><P>In a single measure.</P><P> </P><P>This can be achieved with Calculate, like:</P><PRE>Measure =
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) );
BalanceteGeral[Conta] = 11
)+
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) );
BalanceteGeral[Conta] = 12
)+
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) );
BalanceteGeral[Conta] = 13
)</PRE><P>But, isn't there a more efficient way to use the CALCULATE filter to consider 3 or more filters?</P><P>I could use OR in a single filter, but it only accepts two arguments...</P>Fri, 22 Sep 2017 10:22:49 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257269#M114688webportal2017-09-22T10:22:49ZRe: Measure to sum column with multiple filters
https://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257291#M114699
<P> </P><P>This is one way to do it</P><P> </P><PRE>Measure =
CALCULATE (
ABS ( SUM ( 'BalanceteGeral'[Saldo] ) ),
FILTER(BalanceteGeral, BalanceteGeral[Conta] >= 11),<BR /> FILTER(BalanceteGeral, BalanceteGeral[Conta] <= 13)
)</PRE><P> </P><P> </P><P>A few alternatives to this could be applied, however would imagine for the situation you presented this should work.</P>Fri, 22 Sep 2017 11:40:24 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257291#M114699Anonymous2017-09-22T11:40:24ZRe: Measure to sum column with multiple filters
https://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257292#M114700
<P>Hi <LI-USER uid="12072"></LI-USER>,</P><P> </P><P>You could try to use SUMX or you can use multiply OR - it looks like OR( value1, OR(value1, value2))</P>Fri, 22 Sep 2017 11:41:23 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257292#M114700bsas2017-09-22T11:41:23ZRe: Measure to sum column with multiple filters
https://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257293#M114701
<P>Also, an alternative to using the OR function that bsas suggested is to use || for the Or component. This will allow you to layer up multiple OR conditions, while the OR DAX Function only allows two variables to be compared.</P>Fri, 22 Sep 2017 11:42:32 GMThttps://community.powerbi.com/t5/Desktop/Measure-to-sum-column-with-multiple-filters/m-p/257293#M114701Anonymous2017-09-22T11:42:32Z