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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Mkrishna
Helper III
Helper III

Counting how many distinct product each shop has

Hello Community Members,

 

I am new to Power BI. My company is moving from Excel to PowerBI. I am learning Power BI from various platforms as well but I am not able to find the solution for the problem I have. In Excel I would have used Pivot table and if clause but I am not sure about PowerBI. Please do help.

 

I have a dummy data here which is similar to the sales data I have.  Lets say my company has 5 products (A,B,C,D,E). I want to find how many store that has account with us have atleast 2 diferent products or all five products and how many store do not have any of my products.  I also want to see the % of store of sales rep that have atleast 2 or more products. In Excel, I would use Pivot table and use if function to solve this problem.  

 

Please do guide how can I solve this problem.

 

The picture below shows the data.

photo.jpg

Figure: Data

 

 

I want to one of the matrix as following in the Power BI report look like this

 

photo2.jpg

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Create a matrix visualisation.  Drag the first 4 columns to the row well and the last column to the column well.  Drag this measure to the visual

Is the product sold = coalesce(countrows(Data),0)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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 Kudoed Authors