Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello good people,
Need your help.
I have the following table.
All the columns are calculated columns. I want to have a "Total" which excludes "Gross Profit". Currently it is counting the "Gross Profit" inside the "Total". I want to keep it excluded. Please help.
Solved! Go to Solution.
Hi @Anonymous
You can adjust the below Measure to get the required result.
Sales Total without Contoso =
VAR __totalWithoutContoso =
CALCULATE(
[Sales],
KEEPFILTERS(
NOT 'Product'[Brand] = "Contoso"
)
)
RETURN
IF(
HASONEVALUE( 'Product'[Brand] ),
[Sales],
__totalWithoutContoso
)
@Anonymous , Try like
Total New =calculate([Total],Table[MOH COA Level 6]!="Gross Profit")
or
Total New = if(isfiltered(Table[MOH COA Level 6]),[Total],calculate([Total],Table[MOH COA Level 6]!="Gross Profit"))
refer
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
Hi @Anonymous
You can adjust the below Measure to get the required result.
Sales Total without Contoso =
VAR __totalWithoutContoso =
CALCULATE(
[Sales],
KEEPFILTERS(
NOT 'Product'[Brand] = "Contoso"
)
)
RETURN
IF(
HASONEVALUE( 'Product'[Brand] ),
[Sales],
__totalWithoutContoso
)
Thanks a lot man. Your solution is precise and to the point 😀
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 40 | |
| 30 | |
| 24 |