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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Help with shaping data

I'm attaching a pbix file where everything is setup for help. Basically, I need a slicer to group data and split them by a column. The data has 3 columns:

Shopper

Product
IsPurchase

 

A user needs to select a product from a slicer, and I need a table to show products and count of shoppers that have IsPurchase=1 for the selected product in the slicer, but IsPurchase=0 for the product in the row. 

 

If you open the pbix file and look at the data, you will see better what I need help with 🙂

 

Here is the file: PBIX

 

THANKS!

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

A slicer narrows the portion of the dataset shown in the other visualizations on the page. Slicers are used to filter the rows in table. When you select the product A, it will only return the result based on product A rows, while we are not able to get product B and C. Please review the following screenshot.

1.png

 


Best Regards,
Angelia

Anonymous
Not applicable

Thanks for the reply Angelia (@v-huizhn-msft). My question is how can I filter shoppers that have at least one row with the selected product from the slicer. It doesn't have to be slicer, but any kind of thing that will help me achieve this (DAX perhaps to group by?)

 

Looking forward to your response.

Hi @Anonymous,

You'd better create a measure use the following formula.

Measure = CALCULATE(COUNTA(Sheet1[Product]),FILTER(Sheet1,Sheet1[IsPurchase]=1))


Then create a table, select the product and meaure as row level. You will get that how many the shopper purchase the product.

1.png
While in Power BI desktop, you can't get ProductB and ProductC when you filter product A .

Best Regards,
Angelia

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors