Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hey,
My table follows this structure:
id | Date | Status |
1 | 14/02/2021 | ERROR |
1 | 19/06/2020 | OK |
2 | 30/05/2021 | OK |
3 | 16/01/2021 | OK |
3 | 22/04/2021 | ERROR |
4 | 29/12/2020 | OK |
As you can see, each id can have more than one row, but always with different dates.
I want to create a calculated table only with the rows where the year is equal to the current year and get only the MAX DATE of each id. So the calculated table on the table above should be:
id | Date | Status |
1 | 14/02/2021 | ERROR |
2 | 30/05/2021 | OK |
3 | 22/04/2021 | OK |
How can I do this?
Solved! Go to Solution.
@Anonymous
Create a table as follows:
FILTER(
Table1,
year(Table1[Date]) = year(TODAY()) &&
CALCULATE(
max(Table1[Date]),
ALLEXCEPT(table1,Table1[id])
) = Table1[Date]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Create a table as follows:
FILTER(
Table1,
year(Table1[Date]) = year(TODAY()) &&
CALCULATE(
max(Table1[Date]),
ALLEXCEPT(table1,Table1[id])
) = Table1[Date]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the November 2023 Power BI update to learn about new features.