Forum Discussion
Christianvs
3 years agoHelper II
Selecting value from different row
Hi I got a table that looks like this: My goal is to add a new column called NEWDIST where the DIST value is used unless there are rows with same ID. In that case it should use the DIST...
- 3 years ago
Hi,
I am not sure if the whole possible situations are considered, but seeing the sample provided above, I tried to create a calcualted column like below.
Please check the attached pbix file and the below picture.
New DIST CC = IF ( Data[Ref] = BLANK (), Data[DIST], MAXX ( FILTER ( Data, Data[ID] = EARLIER ( Data[ID] ) && Data[Ref] = BLANK () ), Data[DIST] ) )
Jihwan_Kim
3 years agoSuper User
Hi,
I am not sure if the whole possible situations are considered, but seeing the sample provided above, I tried to create a calcualted column like below.
Please check the attached pbix file and the below picture.
New DIST CC =
IF (
Data[Ref] = BLANK (),
Data[DIST],
MAXX (
FILTER ( Data, Data[ID] = EARLIER ( Data[ID] ) && Data[Ref] = BLANK () ),
Data[DIST]
)
)
Christianvs
3 years agoHelper II
Thanks a lot Jihwan_Kim! It solved my problem 🙂