Forum Discussion
Filter table based on category from other table
Hi everyone,
I've got a small database like this:
My intent is to create a PowerBI report in which the user can filter the Supplier Name (from table 1), and get the QualityFactor (from table 4) of all the suppliers which belong to the same category (tables 2 and 3).
For example if I select Supplier 1 - ABC SRL, I will get the Quality Factors of suppliers 1 and 3.
Here is the pbix file: https://www.dropbox.com/scl/fi/5axb9g3xrdx8d00zm2xs5/SupplierQualification.pbix?rlkey=p6slq2ohf8jhfw3ktqj7br6cy&dl=0
Thanks in advance!
Hi, mtrevisiol
First you need to disconnect Table 1 from Table 4.
Measure = IF ( SELECTEDVALUE ( Table4[IDSupplier] ) IN CALCULATETABLE ( VALUES ( Table2[Activity] ), FILTER ( ALL ( Table2 ), [Supplier] = SELECTEDVALUE ( Table1[IDSupplier] ) ) ), 1, 0 )Put measure in the filter of the view to be filtered and set it equal to 1.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- mtrevisiol
Helper V
Hi, any suggestion?
- v-zhangti
Community Support
Hi, mtrevisiol
First you need to disconnect Table 1 from Table 4.
Measure = IF ( SELECTEDVALUE ( Table4[IDSupplier] ) IN CALCULATETABLE ( VALUES ( Table2[Activity] ), FILTER ( ALL ( Table2 ), [Supplier] = SELECTEDVALUE ( Table1[IDSupplier] ) ) ), 1, 0 )Put measure in the filter of the view to be filtered and set it equal to 1.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.