Forum Discussion
derromma
2 years agoFrequent Visitor
Dynamic Basket Case Analysis
Hello all, I am new to PowerBI and need your help. I have simplified it below: I have a table 'Transactions' with the following details: 'Order Number', 'Product Number', 'Sales', which might look l...
_AAndrade
2 years agoResident Rockstar
derromma
2 years agoFrequent Visitor
Dear _AAndrade , another question came up on my side on this topic:
I have a table visual which displays Sales on total OrderNumber Level (on orders that contain product X) which is also linked to a ProductNumber Slicer. It would be very helpful, if I could click on an order number from that table and have the bottom table (the one on Product Level) show only the products and corresponding valus that were in that specific order.
The current Measure "NewSum Basket" is not affected by filtering for a single Order in the table. This kind of Filtering worked however in the first solution you provided. Is there any way to make this work with the current measure "NewSum Basket"?
SumSales_Order =
CALCULATE (
SUM ( 'T_Transactions'[Sales] ), ALL( 'T_Transactions' ), VALUES('T_Transactions'[OrderNumber] ))
NewSum Basket =
VAR _Table =
CALCULATETABLE(
VALUES(T_Transactions[OrderNumber]),
ALL(T_Transactions),
T_ProdNames[ProductNumber] = SELECTEDVALUE(DiscProdTable[ProductNumber])
)
VAR _Sum =
CALCULATE(
[SumSales],
T_Transactions[OrderNumber] IN _Table
)
RETURN
_Sum