Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello world,
so I have been using analysis services in power bi and I want to compare 2 string columns.
The 2 string columns come from different DIM tables of the model, that are being combined through a FACT table.
I want to compare those two columns somehow, but unfortunately , no matter what I've tried didn't work.
Initially I used this:
Solved! Go to Solution.
Hi @Anonymous ,
If you have columns like [ID] to create relationships between two tables, you can try to create a measure like this and set the visual filter:
Check =
IF (
CONTAINS (
VALUES ( 'Table11'[Requester] ),
'Table11'[Requester], SELECTEDVALUE ( Table22[PO Creator] )
),
"OK",
"Not OK"
)
Table visual would not show the duplicated row if not put separate column in it:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
If you have columns like [ID] to create relationships between two tables, you can try to create a measure like this and set the visual filter:
Check =
IF (
CONTAINS (
VALUES ( 'Table11'[Requester] ),
'Table11'[Requester], SELECTEDVALUE ( Table22[PO Creator] )
),
"OK",
"Not OK"
)
Table visual would not show the duplicated row if not put separate column in it:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try like
Table 2 =
var combinetable = ADDCOLUMNS('Fact - Purchase Orders',"Requestor",RELATED(
'Dim - Purchase Requisitions'[Requisition Preparer]
),"Preparer",RELATED('Dim - Purchase Orders'[PO Header Created By]
))
return
Can you share sample data and sample output in table format?
Requester PO Creator Output
CGC CGC 1
CGC KLP 0
OTI OTI 1
OTI VLS 0
CGC CGC 1
VLS VLS 1
KLP 0
This is some sample data, bear in mind the constraints mentioned on the initial message.
Thanks @amitchandak
@Anonymous , Try a measure like where 'Fact - Purchase Orders'[ID] is there level where you want to compare these names, replace with the correct name
New measure = countx(values('Fact - Purchase Orders'[ID]),If( RELATED('Dim - Purchase Requisitions'[Requisition Preparer]) =RELATED('Dim - Purchase Orders'[PO Header Created By]) ,1,0))
Could this also be changed to show instead of 1 and 0, "OK" & "Not OK", as I've tried it and still shows numbers
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |