Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |