Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I have a dataset that contains users in and all users. I want to be able to compare these columns and return a column that shows users that are in
Expected Result:
Solved! Go to Solution.
@Anonymous solely with a dax measure.
_missingValues =
VAR _1 =
ADDCOLUMNS ( 'Table', "_allUsers", SUBSTITUTE ( 'Table'[All Users], ",", "|" ) )
VAR _2 =
GENERATE (
_1,
ADDCOLUMNS (
GENERATESERIES ( 1, PATHLENGTH ( [_allUsers] ) ),
"Words", PATHITEM ( [_allUsers], [Value], TEXT )
)
)
RETURN
CONCATENATEX (
FILTER (
_2,
[Users off] <> [Words]
&& CONTAINSSTRING ( [Users off], [Words] ) = FALSE ()
),
[Words],
",",
[Words]
)
And a calculated column
Column =
VAR _1 =
ADDCOLUMNS ( 'Table', "_allUsers", SUBSTITUTE ( 'Table'[All Users], ",", "|" ) )
VAR _2 =
GENERATE (
_1,
ADDCOLUMNS (
GENERATESERIES ( 1, PATHLENGTH ( [_allUsers] ) ),
"Words", PATHITEM ( [_allUsers], [Value], TEXT )
)
)
RETURN
CONCATENATEX (
FILTER (
_2,
[Users off] <> [Words]
&& CONTAINSSTRING ( [Users off], [Words] ) = FALSE ()&&'Table'[Index]=EARLIER([Index])
),
[Words],
",",
[Words]
)
PBIX is attached
@Anonymous solely with a dax measure.
_missingValues =
VAR _1 =
ADDCOLUMNS ( 'Table', "_allUsers", SUBSTITUTE ( 'Table'[All Users], ",", "|" ) )
VAR _2 =
GENERATE (
_1,
ADDCOLUMNS (
GENERATESERIES ( 1, PATHLENGTH ( [_allUsers] ) ),
"Words", PATHITEM ( [_allUsers], [Value], TEXT )
)
)
RETURN
CONCATENATEX (
FILTER (
_2,
[Users off] <> [Words]
&& CONTAINSSTRING ( [Users off], [Words] ) = FALSE ()
),
[Words],
",",
[Words]
)
And a calculated column
Column =
VAR _1 =
ADDCOLUMNS ( 'Table', "_allUsers", SUBSTITUTE ( 'Table'[All Users], ",", "|" ) )
VAR _2 =
GENERATE (
_1,
ADDCOLUMNS (
GENERATESERIES ( 1, PATHLENGTH ( [_allUsers] ) ),
"Words", PATHITEM ( [_allUsers], [Value], TEXT )
)
)
RETURN
CONCATENATEX (
FILTER (
_2,
[Users off] <> [Words]
&& CONTAINSSTRING ( [Users off], [Words] ) = FALSE ()&&'Table'[Index]=EARLIER([Index])
),
[Words],
",",
[Words]
)
PBIX is attached
@Anonymous did you try the above?
Hi @amitchandak sorry my current columns are via a DAX Column. Therefore this would need to be done in DAX
Hi @Anonymous ,
Agree with @ amitchandak, it is better to use Power Query to achieve it because the string comparison is strictly defined in DAX and split columns is too complex.
Since the two user columns have been created by DAX, you can consider using the simliar logic to create them in Power Query first and refer this simliar thread to compare string columns to find the difference in Power Query:
Comparing String in two columns for differences
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.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 42 | |
| 35 | |
| 35 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 65 | |
| 58 | |
| 28 | |
| 27 | |
| 25 |