This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
Does anyone know how I can create this with DAX code?:
1) Match values from two columns
2) If true, then the matching values should return 5 if they have an activity that starts with PO (from a column) and have a number that starts with 1,2, or 3 from another column. All of these columns are in the same table.
Please help.
Thank you!
Solved! Go to Solution.
Hey,
it would be really helpful, if you create an xlsx file, that contains some sample data, and also a column with the expected result.
Upload the xlsx to onedrive or dropbox and share the link. Providing sample data reduces the effort to create a working solution and also helps to avoid misunderstandings.
Creating a calculated column you might consider the following DAX functions
Check if the length of both column equals if the value of column 1 is in column 2, if this is the case check if the first 2 characters are PO ...
Hopefully this gets you started.
Regards,
Tom
Hey,
it would be really helpful, if you create an xlsx file, that contains some sample data, and also a column with the expected result.
Upload the xlsx to onedrive or dropbox and share the link. Providing sample data reduces the effort to create a working solution and also helps to avoid misunderstandings.
Creating a calculated column you might consider the following DAX functions
Check if the length of both column equals if the value of column 1 is in column 2, if this is the case check if the first 2 characters are PO ...
Hopefully this gets you started.
Regards,
Tom
Hey,
thanks for providing the sample data, but I'm missing a column "expected result" in one of the two tables.
Can you please describe how the formula should work.
Regards,
Tom
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 45 | |
| 28 | |
| 24 | |
| 22 |