Forum Discussion
Anonymous
6 years agoNot applicable
Assign same value for duplicate entry
Hi, I have a table which has a columns that contains duplicate entries. But there is another column where the values are different. I want to remove the unwanted values and assign the desired va...
- 6 years ago
Hi Anonymous
First, create a dimension table, lets it be named "dimColours". It should be a one column table
You could either import it or create manually using Enter Data function:
Color Red Blue White Then add in your initial table a column
RESULT = var _colorPart = FIRSTNONBLANK(SELECTCOLUMNS(FILTER(ALL('Table');'Table'[Part]=EARLIER([Part]) && 'Table'[Color] IN VALUES(ColorTable[Color]));"Color";'Table'[Color]);1) return IF(ISBLANK(_colorPart);"NA";_colorPart)do not hesitate to give a kudo to useful posts and mark solutions as solution
az38
6 years agoCommunity Champion
Hi Anonymous
First, create a dimension table, lets it be named "dimColours". It should be a one column table
You could either import it or create manually using Enter Data function:
| Color |
| Red |
| Blue |
| White |
Then add in your initial table a column
RESULT =
var _colorPart = FIRSTNONBLANK(SELECTCOLUMNS(FILTER(ALL('Table');'Table'[Part]=EARLIER([Part]) && 'Table'[Color] IN VALUES(ColorTable[Color]));"Color";'Table'[Color]);1)
return
IF(ISBLANK(_colorPart);"NA";_colorPart)
do not hesitate to give a kudo to useful posts and mark solutions as solution