Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have two column In the table first column name ID and next column name pd-id . I am trying to compare First column value and Next column last num if match both value match its return True and both value not match its return False
Example :
ID Pd-id
1 ID01-PS-001
1 ID01-PS-001
2 ID01-PS-001
1 ID01-PS-002
3 ID01-PS-003
2 ID01-PS-002
3 ID01-PS-002
4 ID01-PS-004
Expected output:
ID Pd-id Result
1 ID01-PS-001 True
1 ID01-PS-001 True
2 ID01-PS-001 False
1 ID01-PS-002 False
3 ID01-PS-003 True
2 ID01-PS-002 True
3 ID01-PS-002 False
4 ID01-PS-004 True
I am looking for support . thanks in advance.
Solved! Go to Solution.
Hi @THENNA_41
First , you need to extract the last num in your Pd-id column . Create a calculated column :
Column = RIGHT('Table'[Pd-id],1)
Change data type of the column to whole number .
Then create a calculated column to compare the First column value and Next column last num .
Result = IF('Table'[Column]='Table'[ID],TRUE,false)
You will get a result like this :
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @THENNA_41
First , you need to extract the last num in your Pd-id column . Create a calculated column :
Column = RIGHT('Table'[Pd-id],1)
Change data type of the column to whole number .
Then create a calculated column to compare the First column value and Next column last num .
Result = IF('Table'[Column]='Table'[ID],TRUE,false)
You will get a result like this :
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try to add a new column with the code below:
Result=
IF(CONTAINSSTRING([id], [pd-id]), TRUE, FALSE)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |