Forum Discussion
Filter by related table
- 6 years ago
try this measure:
Quantity_New = CALCULATE ( SUM ( 'TimeTransactions'[Quantity] ), TREATAS ( VALUES ( EmployementOrganization[Employee] ), Employees[Employee] ) )it shows the same values for Department 1 and 3, but I think that's because Employee A is in both departments
Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window). Also please specify which column from 'TimeTransactions' you want to show
| Column1 | Column2 |
| A | 1 |
| B | 2.5 |
the solution will most likely be to use TREATAS to create a virtual relationship (https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/), but without specific example I cannot help more
I made a power Bi file with the data.
I hope this link works, if it doesn't please let me know.
//Link removed
- Stachu6 years ago
Community Champion
try this measure:
Quantity_New = CALCULATE ( SUM ( 'TimeTransactions'[Quantity] ), TREATAS ( VALUES ( EmployementOrganization[Employee] ), Employees[Employee] ) )it shows the same values for Department 1 and 3, but I think that's because Employee A is in both departments
- Anonymous6 years agoNot applicable
Works like a charm, Thanks!
- Stachu6 years ago
Community Champion
glad to help, have a good day 🙂