Forum Discussion
Help on DAX calculate/complex filtering on multiple columns
- 7 years ago
as far as I can tell the syntax is perfectly fine for what you're trying to achieve, with just 2 typos - you use
'table 1' and later 'table1' (no space) - I assume this is actually the same table, correct?
can you add sample 'table1' (in format that can be copied to PowerBI) from your model with anonymised data?
Column1 Column2 A 1 B 2.5 you could rewrite measure like this, but the result is the same for me (I just used 'table1')
Measure = CALCULATE ( SUM ( 'table1'[Sum of Value] ), 'table1'[KPI] = "# Orders", FILTER ( 'table1', 'table1'[Is a partner order] <> 1 || 'table1'[Flag partner] <> 1 ) )
as far as I can tell the syntax is perfectly fine for what you're trying to achieve, with just 2 typos - you use
'table 1' and later 'table1' (no space) - I assume this is actually the same table, correct?
can you add sample 'table1' (in format that can be copied to PowerBI) from your model with anonymised data?
| Column1 | Column2 |
| A | 1 |
| B | 2.5 |
you could rewrite measure like this, but the result is the same for me (I just used 'table1')
Measure =
CALCULATE (
SUM ( 'table1'[Sum of Value] ),
'table1'[KPI] = "# Orders",
FILTER (
'table1',
'table1'[Is a partner order] <> 1
|| 'table1'[Flag partner] <> 1
)
)
Thanks a lot Stachu! In the end my formula worked, it was just a question of summing the right column [Sum of Value2] instead of [Sum of Value] :smileylol:
Your formula was another way to see it and also gave the same result! Thank you!