Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get single distinct value from two columns in expression

hi

my requirement to get distinct value from two columns. i need this in dimension expression

lets say my data rows will be look like this

IdOriginstateDestinationSate
1PAVA
2PATX
3
TX
NY
4FLMA

Finally i need data look like below as single value in expression

ex:

state
PA
VA
TX
NY
FL
MA

please advise me how to get this

3 Replies
swuehl
MVP
MVP

You can follow the idea presented in

Canonical Date

It doesn't really matter if the field is holding dates or states, just create the link table as described.

Anonymous
Not applicable
Author

query4.png

i tried it but its showing  syntax errors

How to write that in expression not in edit script

swuehl
MVP
MVP

I (strongly) recommend that you prepare a link table in your model.