Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, coming from a background in Qlik and now moving into Power BI, there is a functionality that I would like to acheive in Power BI but not sure if/how it is possible. Basically I want to understand e.g. customers that bought a certain type of products, what else did they buy on the same receipts, or what did they buy in another time frame, in another channel, another store etc.....
Simple example: I have my receipts, receiptlines (products) and quantity:
Now I filter a product, e.g. bags, and once that is done I see that there are 4 receipts with bags. Now I filter those 4 receipts by selecting them one by one:
Finally I delete the product filter to see what other products are present on those 4 receipts:
But when I have thousands of receipts or customers, this is not practically possible, and I want a feature that selects/filters the 4 receipts in the example above and keeps only the selected values after I have removed the Product filter. The all-option in Power BI slicer does not work so I assume it has to be done with some DAX-features, variables etc... Any advice on how to acheive this is highly appreciated.
Solved! Go to Solution.
Thanks for the reply from @Syndicate_Admin , please allow me to provide another insight:
Hi,@Tobias1971
Based on your needs, the solution that I can currently implement to better fit your needs is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Then I created two calculated columns that can be used as slicers:
copy1 = SELECTCOLUMNS('main',"product1",'main'[product])
copy2 = SELECTCOLUMNS('main',"product2",'main'[product])
3. Below are the measure I've created for your needs:
Quanlity =
VAR select1=SELECTEDVALUE ('copy1'[product1])
VAR select2=SELECTEDVALUE(copy2[product2])
VAR ID1 =
CALCULATETABLE (
VALUES ( 'main'[Receipit ID]),
FILTER ( ALLSELECTED(main), 'main'[product]=select1)
)
RETURN
if(ISFILTERED('copy1'[product1]),
IF(ISFILTERED(copy2[product2]),
CALCULATE (
SUM(main[quantity]),
FILTER ( 'main', 'main'[Receipit ID]IN ID1 &&'main'[product]=select2)
),
CALCULATE (
SUM(main[quantity]),
FILTER ( 'main', 'main'[Receipit ID]IN ID1 )
)),SUM(main[quantity]))
4.Then modify the visualization options:
5.Here's my final result, which I hope meets your requirements.
When you don't choose, show all:
When you select the first slicer, find the value with the same receipt id as it.
When you select the second slicer, only the value of the product you selected is displayed on the result of finding the same value as its Receipt id.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from @Syndicate_Admin , please allow me to provide another insight:
Hi,@Tobias1971
Based on your needs, the solution that I can currently implement to better fit your needs is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Then I created two calculated columns that can be used as slicers:
copy1 = SELECTCOLUMNS('main',"product1",'main'[product])
copy2 = SELECTCOLUMNS('main',"product2",'main'[product])
3. Below are the measure I've created for your needs:
Quanlity =
VAR select1=SELECTEDVALUE ('copy1'[product1])
VAR select2=SELECTEDVALUE(copy2[product2])
VAR ID1 =
CALCULATETABLE (
VALUES ( 'main'[Receipit ID]),
FILTER ( ALLSELECTED(main), 'main'[product]=select1)
)
RETURN
if(ISFILTERED('copy1'[product1]),
IF(ISFILTERED(copy2[product2]),
CALCULATE (
SUM(main[quantity]),
FILTER ( 'main', 'main'[Receipit ID]IN ID1 &&'main'[product]=select2)
),
CALCULATE (
SUM(main[quantity]),
FILTER ( 'main', 'main'[Receipit ID]IN ID1 )
)),SUM(main[quantity]))
4.Then modify the visualization options:
5.Here's my final result, which I hope meets your requirements.
When you don't choose, show all:
When you select the first slicer, find the value with the same receipt id as it.
When you select the second slicer, only the value of the product you selected is displayed on the result of finding the same value as its Receipt id.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This may not be a useful value for a similar function.