Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
I am quite new to Powerpivot so please be kind 🙂
I am trying to create a new metric "# Orders" with different filters:
* on column "KPI", sum only the KPI called "# Orders"
* filter OUT (do not add in the sum) the combination of 2 filters on 2 other columns: the value "1" on column "Is a partner order" and the value "1" on column "Flag partner". Here I mean that having one of them true is fine, the values I want to exclude are the ones where BOTH filters combined are true (1 AND 1).
I have tried:
# Orders:= calculate ( [Sum of Value] , 'table 1'[KPI] = "# Orders" , filter ( 'table1', NOT ( value('table 1'[Is a partner order])=1 && 'table1'[Flag partner]=1 )))
But it doesn't give out the result I am expecting.
Could someone please help me write it correctly?
Thanks in advance for any help or advice you might have!
Manon
Solved! Go to Solution.
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] ![]()
Your formula was another way to see it and also gave the same result! Thank you!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |