To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.