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.
I am trying to remove row context of specific columns. I am trying to return a % of total sales relevent to a specific sales channel for each product. In otherwords every product when viewed across each channel would total 100%. To do this I am creating a VAR totalSales which should calculate total sales for each product across total market. However my current result is giving me a % of total sales for all products and all markets.
I would really appreciate anyone who can try and help point me in the right direction as I have not been able to solve this for the last few days!
| Channel A | Channel B | |
| Brand A | 65% | 35% |
| Product A | 50% | 50% |
Product B | 40% | 60% |
Product C | 70% | 30% |
Dol SOT CY =
VAR totalSales =
calculate(
SUM(Data[Dollars]),
ALLEXCEPT(Data,Data[Product])
)
Var sales = SUM(Data[Dollars])
Return
sales/totalSales
Solved! Go to Solution.
Probably something like this:
[Total] = SUM( Data[Dollars] )
[Dol SOT CY] =
VAR __totalAcrossMarkets =
CALCULATE(
[Total],
VALUES( Data[Product] ),
ALL( Data )
)
VAR __currentTotal = [Total]
VAR __result =
DIVIDE( __total, __totalAcrossMarkets )
RETURN
__result
Best
D
Probably something like this:
[Total] = SUM( Data[Dollars] )
[Dol SOT CY] =
VAR __totalAcrossMarkets =
CALCULATE(
[Total],
VALUES( Data[Product] ),
ALL( Data )
)
VAR __currentTotal = [Total]
VAR __result =
DIVIDE( __total, __totalAcrossMarkets )
RETURN
__result
Best
D
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |