Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance 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 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |