Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Helle everyone,
I have a table like that:
| doc | Val | Date |
| doc1 | Val1 | 01/01/2022 |
| doc1 | Val1 | 01/03/2022 |
| doc2 | Val2 | 01/01/2022 |
| doc2 | Val2 | 01/02/2022 |
| doc3 | val3 | 01//02/2022 |
With a DAX function, I look for create a new column (or new table) to filter each row with the last date and to have this new table :
| doc | Val | Last Date |
| doc1 | Val1 | 01/03/2022 |
| doc2 | Val2 | 01/02/2022 |
| doc3 | val3 | 01//02/2022 |
I look with LASTDATE but I'm not able to find a good (and working) solution.
Could you help me ?
Thank in advance
Solved! Go to Solution.
@Charlie42 sure
Table =
FILTER (
tbl,
tbl[Date]
= CALCULATE ( MAX ( tbl[Date] ), ALLEXCEPT ( tbl, tbl[doc], tbl[Val] ) )
)
@Charlie42 sure
Table =
FILTER (
tbl,
tbl[Date]
= CALCULATE ( MAX ( tbl[Date] ), ALLEXCEPT ( tbl, tbl[doc], tbl[Val] ) )
)
In Power Query group your doc and val by the maximum of date.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |