Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Power BI champions
I have two Related tables Table A to Table B ( 1 to many )
Table A - With Product IDs ( Unique ) and one Entry per Product ID
Table B - With multiple entries of the same Product IDs with their related part Numbers and at part Level compliance YES or NON-C
Based on that data
I want to have one column against each unique Product ID in Table- A if any of the active parts are NON-C for that Product ID in Table B, then the whole product will become Not Compliance in Table A
Table A
Product ID |
19CB001 |
19IT500 |
18NP001 |
19IT001 |
19IT005 |
Table B
Product ID | Part ID | Part State | Part Compliance |
19CB001 | 1 | Active | YES |
19CB001 | 2 | Active | YES |
19CB001 | 3 | Active | NON-C |
19IT500 | 1 | Active | YES |
19IT500 | 2 | Active | YES |
19IT500 | 3 | Closed | NON-C |
19IT500 | 4 | Active | YES |
18NP001 | 1 | Hold | YES |
18NP001 | 2 | Hold | NON-C |
19IT001 | 1 | Active | NON-C |
19IT005 | 1 | Active | YES |
Table C:: Desired Output
Product ID | Desired Results |
19CB001 | Not Compliance |
19IT500 | Compliance |
18NP001 | Compliance |
19IT001 | Compliance |
19IT005 | Compliance |
Thanks
Solved! Go to Solution.
[Product Compliance] = -- calculated column var __prodID = TA[Product ID] var __notCompliant = NOT ISEMPTY( FILTER( RELATEDTABLE( TB ), TB[Part State] = "active" && TB[Part Compliance] = "non-c" ) ) return if ( __notCompliant, "Not Compliant", "Compliant" )
Best
Darek
[Product Compliance] = -- calculated column var __prodID = TA[Product ID] var __notCompliant = NOT ISEMPTY( FILTER( RELATEDTABLE( TB ), TB[Part State] = "active" && TB[Part Compliance] = "non-c" ) ) return if ( __notCompliant, "Not Compliant", "Compliant" )
Best
Darek
its showing True or False , which i converted later , thanks for the help , appreciated
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |