Forum Discussion
Use DAX or Power Query to create a calculated column
- 4 years ago
ok so if there is no rule, what is the rule you want to select the data, just the first one in sequential order?
I would add an index in the transformation layer (power query), under add column / index column
and then create a dax measure
addressstatus =
VAR person =
SELECTEDVALUE ( 'table'[fullname] )
VAR currindex =
SELECTEDVALUE ( 'table'[idcolumn] )
VAR minid =
CALCULATE ( min ( 'table'[idcolumn] ), 'table'[fullname] = person )
VAR status =
IF ( currenindex = minid, "Current Address", "PreviousAddress" )
RETURN
status
how do you know which is which? is there a date column, or is it the first in line?
if first inline you can create a index column to extract the data out, if you can provide the data in text format, not a picture that would be good and i can demonstrate. easier with data.
- Anonymous4 years agoNot applicable
vanessafvg - There is no date with the table. All the records was parsed on JSON and expanded address resulted to the table above. When i look at the json structure, the first is the current address.