Forum Discussion
NSBS
3 years agoHelper I
Sorting And Comparing Row in Power BI
Hi Power BI Community, Need help in creating DAX code or power query code to create additional column (Run # and Final Status) in below File Run Dataset Table Initial column detail as per bel...
- 3 years ago
NSBS , New columns
Run = rankx(filter(Table, [File Name] = earlier([Filename]) ), [Loaded Date/Time],,asc,dense)
Final Status = minx(filter(Table, [Run] = earlier([Run]) ) ,[Status] )
FreemanZ
3 years agoSuper User
hi NSBS
try to add the expected columns like this:
Rank #2 =
RANKX(
ALL(TableName[Loaded Date / Time]),
TableName[Loaded Date / Time],
,ASC
)
Final Status2 =
VAR _runid = [Run Id]
VAR _table =
FILTER(
TableName,
TableName[Run Id] = _runid
)
RETURN
MINX(
_table,
TableName[Status]
)it shall work like this: