Forum Discussion
Penn
Resolver I
7 years agoDAX Question: Return the first date based on another column
Hi Everyone, My first post here, very new to Power BI. Let's imaging a table [Work Status] that looks like below. Now I want to create a new column to return the first date of Finish...
- 7 years ago
Sorry I think I misplaced the brackets
Try this one
Status Finished Date = CALCULATE ( MIN ( 'Work Status'[Date From] ), FILTER ( ALLEXCEPT ( 'Work Status', 'Work Status'[item id] ), 'Work Status'[Status] = "Finished" ) )
Zubair_Muhammad
Community Champion
7 years ago
Try with this revision
Status Finished Date =
CALCULATE (
MIN (
'Work Status'[Date From],
FILTER (
ALLEXCEPT ( 'Work Status', 'Work Status'[item id] ),
'Work Status'[Status] = "Finished"
)
)
)
- Penn7 years ago
Resolver I
Hi Zubair,
I tried your code in both measure and calculated column and it returns me the "single value cannot be determined" error.
How should I fix this?
- Zubair_Muhammad7 years ago
Community Champion
Sorry I think I misplaced the brackets
Try this one
Status Finished Date = CALCULATE ( MIN ( 'Work Status'[Date From] ), FILTER ( ALLEXCEPT ( 'Work Status', 'Work Status'[item id] ), 'Work Status'[Status] = "Finished" ) )- Penn7 years ago
Resolver I
You are absolutely briliant!!! Thank you!!!