Forum Discussion
CALCULATETABLE with filter from multiple table
- 1 year ago
Hi albypeter ,
One approach is to create a calculated table that does not rely on relationships between the tables. Here is an example of a calculated table for your use case:PricePaid = SUMMARIZECOLUMNS( 'Class Students'[StudentID], "TotalPaid", CALCULATE( SUMX( 'Invoice Lines', 'Invoice Lines'[Quantity] * 'Invoice Lines'[UnitPrice] ), TREATAS ( VALUES('Class Students'[InvoiceID]), 'Invoice Lines'[InvoiceID]) ) )
Please let me know if this achieves your desired result.If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,Samson
Connect with me on LinkedIn
Check out my Blog
Going to the European Microsoft Fabric Community Conference? Check out my Session
- 1 year ago
Thnak you, will try the solution and update soon
- 1 year ago
Hi albypeter ,
As per the original post, I tried to implement the solution. Please find the pbix file.
CALCULATETABLE with filter from multiple table.pbixBest Practices:
1.Avoid ambiguous relationships by using DAX instead of physical relationships.
2.Use TREATAS or LOOKUPVALUE to simulate joins.
3.Use calculated measures to dynamically compute per-student pricing.Please let me know if there is any missing things in the pbix file.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi
Hi albypeter ,
As per the original post, I tried to implement the solution. Please find the pbix file.
CALCULATETABLE with filter from multiple table.pbix
Best Practices:
1.Avoid ambiguous relationships by using DAX instead of physical relationships.
2.Use TREATAS or LOOKUPVALUE to simulate joins.
3.Use calculated measures to dynamically compute per-student pricing.
Please let me know if there is any missing things in the pbix file.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi