Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
106 | |
75 | |
44 | |
39 | |
33 |
User | Count |
---|---|
165 | |
90 | |
65 | |
46 | |
43 |