Join 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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi
I have calculated sell-through and when I select multiple weeks in the filter, I want to show only sell-through of max week selected as total not sum of everything to calculate..
How can I do it?
What I want is to bring 77.2% as total ST% instead of 5.6%..
Same for the stock gross, I want to bring 503,239,352 instead of sum of everything.
I need help!
Thanks
Solved! Go to Solution.
Try this measure. This assumes you have a calendar type table setup for the week numbers
ST =
VAR MaxWeek = MAX('YourWeekTable'[WeekColumn]) -- Adjust 'YourWeekTable' and 'WeekColumn' to your table and column names
VAR MaxSalesGrossAcc =
CALCULATE(
SUM('YourTable'[SalesGrossAcc]),
'YourWeekTable'[WeekColumn] = MaxWeek
)
VAR MaxStockGrossAcc =
CALCULATE(
SUM('YourTable'[StockGrossAcc]),
'YourWeekTable'[WeekColumn] = MaxWeek
)
VAR SalesGrossAcc = SUM('YourTable'[SalesGrossAcc])
VAR StockGrossAcc = SUM('YourTable'[StockGrossAcc]),
VAR MaxSellThroughPercentage = DIVIDE(MaxSalesGrossAcc, MaxSalesGrossAcc + StockGrossAcc)
VAR SellThroughPercentage = DIVIDE(SalesGrossAcc, SalesGrossAcc + StockGrossAcc)
RETURN
IF(
HASONEVALUE('YourWeekTable'[WeekColumn]),
SellThroughPercentage,
MaxSellThroughPercentage
)
Try this measure. This assumes you have a calendar type table setup for the week numbers
ST =
VAR MaxWeek = MAX('YourWeekTable'[WeekColumn]) -- Adjust 'YourWeekTable' and 'WeekColumn' to your table and column names
VAR MaxSalesGrossAcc =
CALCULATE(
SUM('YourTable'[SalesGrossAcc]),
'YourWeekTable'[WeekColumn] = MaxWeek
)
VAR MaxStockGrossAcc =
CALCULATE(
SUM('YourTable'[StockGrossAcc]),
'YourWeekTable'[WeekColumn] = MaxWeek
)
VAR SalesGrossAcc = SUM('YourTable'[SalesGrossAcc])
VAR StockGrossAcc = SUM('YourTable'[StockGrossAcc]),
VAR MaxSellThroughPercentage = DIVIDE(MaxSalesGrossAcc, MaxSalesGrossAcc + StockGrossAcc)
VAR SellThroughPercentage = DIVIDE(SalesGrossAcc, SalesGrossAcc + StockGrossAcc)
RETURN
IF(
HASONEVALUE('YourWeekTable'[WeekColumn]),
SellThroughPercentage,
MaxSellThroughPercentage
)
st = sales gross acc / (sales gross acc+stock gross)
Can you please post the text for the ST% measure?
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 |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |