Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm looking to create a customer column based on two columns in the same table.
If Column 1 contains a number (3 digits) and Column 2 is contains the same number , then I want to label it 'Direct'. If the digits in either column do not match, then label it 'Indirect'. The caveat is that on occassion, there may be data in column 1, but no data in column 2.
Any help would be appreciated!
Solved! Go to Solution.
Hi @Tob_P
Please refer to attached file with the solution
Output2 =
IF (
'Table'[Col 1] IN ALLNOBLANKROW ( 'Table'[Col 2] ),
IF (
'Table'[Col 1] = 'Table'[Col 2]
|| 'Table'[Col 2] = BLANK ( ),
"Direct",
"Indirect"
)
)
Hi @Tob_P
Please refer to attached file with the solution
Output2 =
IF (
'Table'[Col 1] IN ALLNOBLANKROW ( 'Table'[Col 2] ),
IF (
'Table'[Col 1] = 'Table'[Col 2]
|| 'Table'[Col 2] = BLANK ( ),
"Direct",
"Indirect"
)
)
Thanks @Anonymous
Apologies - I did not explain this well at all.
| Col 1 | Col 2 | Output |
| 222 | 222 | Direct |
| 222 | 225 | Indirect |
| 222 | 227 | Indirect |
| 222 | Direct | |
| 227 | 222 | Indirect |
| 222 | Indirect | |
| 222 | 222 | Direct |
Working on the basis of code 222...
Ok. no probs. Try this :
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 13 | |
| 10 | |
| 8 |