Forum Discussion
Anonymous
5 years agoNot applicable
Relationship with 3 tables in Direct Query
Hello everyone, Need a little help. I have 3 tables like below: If I want to calculate Sales amount by Item group which the Sales Order Status is "Closed". What will be the DAX ? I was th...
- 5 years ago
Anonymous
To count sales id:
calculate( distinctcount( order line[sales id ] ), Sales order[status]="closed")
to count workers:
calculate( count( sales order[workers] ), Sales order[status]="closed", order line)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
StefanoGrimaldi
5 years agoResident Rockstar
this its a example of the SQL statement you could be using or a variation of it using leftouter relantionship according to your need
SELECT * FROM [table1] JOIN [table2] ON [table1.primary_key] = [table2.foreign_key];