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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
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.
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,....)"
.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 36 | |
| 32 | |
| 31 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 86 | |
| 85 | |
| 68 | |
| 64 |