Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
derromma
Frequent 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 like this:
1 A 10€
1 B 15€
1 C 7,5€
2 A 10€
2 C 7,5€
3 B 15€
3 C 7,5€
...

I now want a page, where I can select a Product in a slicer and get a table visual, which shows all Products, that were bought in the orders, which contain the product filtered to and the corresponding sales of the individual products, which might look like this:

Slicer: Product A
Table Visual:
A 20€
B 15€
C 15€
...

So basically, I want the product slicer to filter for a list of orders, which contain the product, but the table visual to only reference to this list of orders and show the included products. This should be working dynamically, so it adjusts everytime I choose a different product in the slicer.

How do I achieve this? Many thanks for your help.

1 ACCEPTED SOLUTION
_AAndrade
Resident Rockstar
Resident Rockstar

Hi @derromma,

 

Take a look at the new pbix file and see if it's what you're looking for.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




View solution in original post

5 REPLIES 5
_AAndrade
Resident Rockstar
Resident Rockstar

Hi @derromma,

 

Take a look at the new pbix file and see if it's what you're looking for.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




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"?

derromma_1-1716823118027.png

 

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

Thank you!!

_AAndrade
Resident Rockstar
Resident Rockstar

Hi @derromma,

I'm attaching my solution in pbxi file.
The final output is this:

_AAndrade_0-1715940359534.png

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Many thanks for your swift help, really appreciated! It works a treat. I do have a follow up question though: If I now wanted to get the product name into the table visual, from a second table "masterdata" (which is linked to my 'Transactions' table via the "product number", how would this work?
If currently I add the 'product_name' to my table visual, it starts filtering to only the selected product of the slicer.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.