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
Hi,
I have these columns in my data source and I am trying to view the document that contains the most recent update.
Ex: I have a document DOC_ID = 4 and I want to bring the one with the most recent update date, for each different company. How could I do that in power bi?
I already looked for several ways to do it on websites and here in the community and I didn't get the result.
Thanks to anyone who can help
here's the Google Drive link with the pbi file to understand
https://drive.google.com/drive/folders/1dxg-LAkHZWWevyxKNIz41cOb9eEyFdkv
| DATE | COMPANY | DATAUPDATE | DOC_ID | NameDoc | DOCUMENTO_APROV_OBS | DOCUMENTO_APROV_REGULARIZA | STATUS |
| NULL | A | NULL | NULL | NULL | NULL | OK | |
| NULL | A | NULL | NULL | NULL | NULL | OK | |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:21:44.483 | 1 | DOC1 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:21:33.387 | 2 | DOC2 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:21:52.400 | 3 | DOC3 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:22:00.647 | 4 | DOC4 | NULL | NULL | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:22:09.420 | 5 | DOC5 | Please post the collective agreement. | send doc | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:22:18.317 | 6 | DOC6 | Please post the collective agreement. | send doc | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:22:26.673 | 7 | DOC7 | NULL | NULL | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-09-16 12:22:35.953 | 8 | DOC8 | NULL | NULL | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:22:46.077 | 4 | DOC4 | NULL | NULL | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:22:56.307 | 5 | DOC5 | NULL | NULL | NOT OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:23:05.993 | 6 | DOC6 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:23:05.994 | 13 | DOC13 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:23:05.995 | 14 | DOC14 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:23:05.996 | 15 | DOC15 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:23:05.997 | 16 | DOC16 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | A | 2020-11-16 12:23:05.998 | 17 | DOC17 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | B | ] | 18 | DOC18 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | B | 2020-09-16 12:24:21.617 | 19 | DOC19 | NULL | NULL | OK |
| 2020-08-10 00:00:00.000 | B | 2020-09-16 12:24:32.013 | 23 | DOC23 | NULL | NULL | OK |
@Anonymous , expected output is not very clear. But you can have status on the last date for doc like this
a new measure
Measure =
VAR __id = MAX ('Table'[DOC_ID] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[DOC_ID] = __id )
CALCULATE ( MAX ('Table'[STATUS] ), VALUES ('Table'[DOC_ID] ),'Table'[DOC_ID] = __id,'Table'[Date] = __date )
create measure for other columns
if you observe doc_id 4, 5, 6 are repeated for the filtered company in the month of August, the dateupdate is the date that had the modification of each. The visualization intended is to have these doc_id (example) appearing only once, according to the most recent dataupdate
I appreciate the help, but this measure has the wrong syntax when I make a measurement in power bi
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |