Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
This count of sales per employee per product should be really simple, but I have not found a simple way to do this in DAX. Appreciate any guidance to make a measure in the sales fact table. All tables are modeled in a star schema.
Employee dimension
| PK Employee | Name |
| 1 | Jane |
| 2 | Joe |
| 3 | Alice |
Product dimension
| PK Product | Product name |
| 1 | Wrench |
| 2 | Gadget |
| 3 | Clack |
Sales fact table
| FK Employee | FK Product |
| 1 | 1 |
| 2 | 2 |
| 2 | 2 |
| 3 | 3 |
Expected table visual
| Employee | Product | Number of sales |
| Jane | Wrench | 1 |
| Joe | Gadget | 2 |
| Alice | Clack | 1 |
Solved! Go to Solution.
Hi, @BiJoe
Based on your information, here is my model relationship.
I create a new measure named Number of sales
Here is my DAX:
Number of sales = COUNT('Sales fact table'[FK Employee])
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @BiJoe
Based on your information, here is my model relationship.
I create a new measure named Number of sales
Here is my DAX:
Number of sales = COUNT('Sales fact table'[FK Employee])
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 64 | |
| 31 | |
| 29 | |
| 24 |