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
Hi Anonymous
what is the rule to define the current address? any indexes or dates or smth else?
- Anonymous4 years agoNot applicable
az38 - there is no rule that define current address. The table was parsed on JSON, no index, no date.
- vanessafvg4 years agoCommunity Champion
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