I am eager to create a calculated column in Power BI using DAX. From my table in the form of
projects valid_date target
2M 03/24/2019 0.9
3D 03/25/2019 1
5K 03/25/2019 0.9
2M 03/26/2019 0.9
3D 03/26/2019 0.5
5K 03/24/2019 0.6
... ... ...
I look to generate a cloumn that holds the value for target, but only if it is the one of the latest "valid_date" for each distinct project.
The result ("latest_target") should look like this:
projects valid_date target latest_target
2M 03/24/2019 0.9 NULL
3D 03/25/2019 1 NULL
5K 03/25/2019 0.9 0.9
2M 03/26/2019 0.9 0.9
3D 03/26/2019 0.5 0.5
5K 03/24/2019 0.6 NULL
... ... ... ...
What would the DAX formula look like for such a column? I have already tried out some formulas, but as I lack translating my T-SQL ideas into DAX effectively, I don't think it would be helpful to share these here.