Hello:
I viewed Sam’s “Product Sales Scenario” (Scenario Analysis Patterns = PBIX), this afternoon.
There was one aspect of the session I couldn’t grasp.
Essentially, Sam uses this session to discuss “what-if” parameters, in this case to examine the effect of Demand and Discounting changes on Sales and Profits.
He uses a slicer to permit users to select however many products they’d like to run through the what-if parameters.
He constructs a measure, “Discounted Sales”, containing a VAR to provide this list of product(s). I don’t see how the VAR makes the connection from the slicer to the DAX. I pasted in the measure below.
I appreciate that this is an arcane question, to say the least. Any insights you provide will be much appreciated.
Discounted Sales =
VAR
DiscountedProducts = INTERSECT( VALUES( Products[Product Name] ), ALL( Products[Product Name] ) )
RETURN
CALCULATE(
SUMX( Sales, ( Sales[Quantity] * (1 + [% Demand Change] ) * ( RELATED( Products[Current Price] ) * (1 + [Discounting Value] ) ) ) ),
DiscountedProducts )
Regards,
John Giles