Forum Discussion

BiJoe's avatar
BiJoe
Icon for Helper II rankHelper II
2 years ago
Solved

How to count facts from two dimensions?

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 table...
  • Anonymous's avatar
    Anonymous
    2 years ago

    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.