Please advise. Simple situation but I got stuck.
I have a table that looks like that:
I need to group it by name, take min(OnDate)
and (here is the question) take the Department which was when date = min(OnDate)
If I do like:
Go to Solution.
Hi @nsbars_rt ,
You can try to create a new calculated column using the if statement.
VAR min_date = CALCULATE(MIN('TABLE'[ondate]),ALLEXCEPT('TABLE','TABLE'[name]))
You can filter on the table chart or create a new calculated table.
Table 2 = SELECTCOLUMNS(FILTER('TABLE','TABLE'[Column]=1),"name",'TABLE'[name],"ondate",'TABLE'[ondate],"department",'TABLE'[department])
Best Regards,LiangIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
View solution in original post
@nsbars_rt, Try lastnonblankvalue
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.