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
StevenDB
New Member

Sales Analysis

Hello all,

 

From our POS-software I get an SQL-database with a variety of data, such as

- a unique code which refers to a specific ticket

- the different product categories

- the number of articles

- the price of these articles

- the total amount paid

- date-info

- shop/location info

and many more.

 

What I would like to do now is to find out what products the costumers buy in which category. More specific an answer to the question:

When a customer buys an article from category A, does he buy products from other categories? If so, which category or categories?

The result of this query should be that when I select a category from a slicer, I get the other category (-ies) that customers buy. For the moment I am only interested in the categories, not in the specific kinds of products. 

 

I am fairly new to PowerBi (and BI in general). So far I have managed to create a decent dashboard but this question is out of my league at the moment.

 

Ideas on how to start with this are very welcome.

 

Thanks and greetings,

 

Steven

 

 

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @StevenDB

 

It is great that you are getting into BI and Power BI.


What I would suggest is when getting your data to only bring in the fields that you currently need. To simplify the process as you are just starting out.

 

So that would be:

-Unique Code

-Different Product Categories

-Number of Articles

-Price of Articles

-Date Info

 

Start with that and put that into your Power BI Model.

 

Once you have the above you should then be able to put the Unique Code on a Slicer, and have all the other details in a table. And when you click on a Unique Code you can see which items they bought, as well as the product categories.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hello guavaq,

 

Thank you for the effort but this is not what I am looking for. I could work this way but not in this case. The reason is that there are just too many unique codes to be able to use as a slicer or filter. This year alone there are already more than 108.000 unique codes.

I started with a DISTINCTCOUNT on these codes which helps me to group them by categorie. That is a start but this only tells me how many codes (customers) have bought something from the selected category. With this I get no information on the other categories.

 

I'm thinking that I shoud work with a Category-slicer, since there are only about 20 of them.

Maybe I can rephrase the question to something like "x (number or percentage) of the unique codes (= customers) that bought category A also bought category B (and/or C, and/or,....)"

 

.

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.