Forum Discussion
JamesLeach
7 years agoFrequent Visitor
Calculated column or measure? Data from specific row for all rows matching value in another column.
Hello everyone! I've got a data set similar to this (without the 'UniqueId' column - that's what I'm trying to add). Record Data Value UniqueId 1 UniqueId 1001 1001 1 Thomas...
- 7 years ago
As a calculated column, you could do this:
UniqueID = VAR __table = FILTER(ALL('Table2'),[Record]=EARLIER([Record]) && [Data]="UniqueId") RETURN MAXX(__table,[Value])As a measure, it would be:
mUniqueID = VAR __record = MAX([Record]) VAR __table = FILTER(ALL('Table2'),[Record]=__record && [Data]="UniqueId") RETURN MAXX(__table,[Value])Assuming you put it in a visualization with at least Record.
Greg_Deckler
7 years agoCommunity Champion
As a calculated column, you could do this:
UniqueID =
VAR __table = FILTER(ALL('Table2'),[Record]=EARLIER([Record]) && [Data]="UniqueId")
RETURN
MAXX(__table,[Value])
As a measure, it would be:
mUniqueID =
VAR __record = MAX([Record])
VAR __table = FILTER(ALL('Table2'),[Record]=__record && [Data]="UniqueId")
RETURN
MAXX(__table,[Value])
Assuming you put it in a visualization with at least Record.
JamesLeach
7 years agoFrequent Visitor
Great, thank you!
That's exactly what I was looking for.
I really appreaciate your help.
- Greg_Deckler7 years agoCommunity Champion
Happy to help!