Forum Discussion

derromma's avatar
derromma
Frequent Visitor
2 years ago

Re: Dynamic Basket Case Analysis

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
No RepliesBe the first to reply