Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I'm trying to display matching part numbers based on them having an opposite Stock Status. Using the example data below, I need a way to match Company A with Company B based on them both having Part Number 123ABC in their inventory while at the same time having opposite Stock Status.
| Company | Part Number | Stock Status |
| A | 123ABC | Stock |
| B | 123ABC | No Stock |
| C | 456ABC | No Stock |
| D | 456ABC | Stock |
| E | 789XYZ | Stock |
| F | 789XYZ | No Stock |
| G | 741QWE | Stock |
| H | 741QWE | No Stock |
Does anyone have a solution for this?
Hi,
What exact results are you expecting?
Try this column for more than 1 match
Column =
CONCATENATEX (
FILTER (
ALL ( 'Table1' ),
Table1[Part Number] = EARLIER ( Table1[Part Number] )
&& Table1[Stock Status] <> EARLIER ( Table1[Stock Status] )
),
Table1[Company],
", "
)
Assume the table is called "Table1", add a calculated COLUMN which will show the reciprocal company.
=CALCULATE( VALUES('Table1'[Company]),FILTER(ALL('Table1'),Table1[Part Number] = EARLIER(Table1[Part Number])&&Table1[Stock Status]<>EARLIER(Table1[Stock Status])))
Thank you @BraneyBI! The calculated column is working however, when I add more than 2 companies to my dataset, I get an error message. Is there any way to modify the calculated column to account for more companies and possibly more than one match?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 33 | |
| 31 | |
| 29 |