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 nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
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 😀
| User | Count |
|---|---|
| 23 | |
| 22 | |
| 21 | |
| 18 | |
| 11 |
| User | Count |
|---|---|
| 56 | |
| 54 | |
| 43 | |
| 36 | |
| 34 |