Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I want to sum the absolute value of column "Saldo" in table "Balancete Geral", whose column "Conta" is:
In a single measure.
This can be achieved with Calculate, like:
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 )
But, isn't there a more efficient way to use the CALCULATE filter to consider 3 or more filters?
I could use OR in a single filter, but it only accepts two arguments...
Solved! Go to Solution.
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.
Hi @webportal,
You could try to use SUMX or you can use multiply OR - it looks like OR( value1, OR(value1, value2))
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.
This is one way to do it
Measure = CALCULATE ( ABS ( SUM ( 'BalanceteGeral'[Saldo] ) ), FILTER(BalanceteGeral, BalanceteGeral[Conta] >= 11),
FILTER(BalanceteGeral, BalanceteGeral[Conta] <= 13) )
A few alternatives to this could be applied, however would imagine for the situation you presented this should work.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
57 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
44 | |
40 |