Forum Discussion
EaglesTony
Post Prodigy
1 year agoHow can I get a column duplicated based on a key
Hi, I have this table: Key Status Date 1 Review null 1 In Progress 8/1/2024 1 Done null What I need...
- 1 year ago
I "brute-forced" it a bit, I hope it will work for you.
IF( ISBLANK( CALCULATE( SELECTEDVALUE (Table1[Date]), ALLEXCEPT(Table1,Table1[Key]),Table1[Status]="InProgress")),BLANK(), CALCULATE( SELECTEDVALUE (Table1[Date]), ALLEXCEPT(Table1,Table1[Key]),NOT (ISBLANK(Table1[Date])),Table1[Status]="InProgress"))
Anonymous
1 year agoNot applicable
Thanks for MNedix's concern about this issue.
Hi, EaglesTony
I am glad to help you.
You can create a calculated column by referring to my DAX formula:
FinalDate =
VAR InProgressDate =
CALCULATE(
MAX('Table'[Date]),
FILTER('Table', 'Table'[Key] = EARLIER('Table'[Key]) && 'Table'[Status] = "In Progress")
)
RETURN
IF(
ISBLANK('Table'[Date]),
InProgressDate,
'Table'[Date]
)
Here are the results:
I have attached the PBIX file of this simple example below, I hope it will be helpful to you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
EaglesTony
Post Prodigy
1 year agoIs there a way to do this in a Power Query instead of DAX ?...I do some merges along the way in Power Query, so that is why.