The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have 2 columns within the same table and I trying to find a DAX function that uses the value of 1 column to search the other to see if it contains the 1st as an exact match.
Column 1 contains a list of fitting numbers.
Column 2 contains a description of the fitting and in some cases the fitting number as well.
Any help would be appreciated.
Solved! Go to Solution.
Hi @_Kelz0484
Please try this m code:
let a = List.Contains(Text.Split([Description]," "),[Fitting No])
in if a = true then "Exact Match" else "Mismatch"
You can add a custom column in power query:
Then paste the code in it:
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @_Kelz0484
Please try this m code:
let a = List.Contains(Text.Split([Description]," "),[Fitting No])
in if a = true then "Exact Match" else "Mismatch"
You can add a custom column in power query:
Then paste the code in it:
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@_Kelz0484 Can you provide some sample data posted as text to test with?
Hi @_Kelz0484
Would a column llike this help?
Result =
IF(
LEN( [Fitting No] ) = 0,
"Mismatch",
IF(
CONTAINSSTRINGEXACT(
[Description],
[Fitting No]
),
"Exact Match",
"Mismatch"
)
)
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |