Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to get all rows data for "latest date" in the report

Ho to get latest date data for all rows, 

For example we only have data till 25th Feb'22, so i want to show the data for 24th Feb'22, and of we would have data for next any date then show that date Data only

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I create a sample with a date column and a value column.

vcgaomsft_3-1646618258958.png

Then create a measure.

 

The latest data =
VAR _latest_date_1 =
    MAX ( 'Table'[Date] )
VAR _latest_date_2 =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] < _latest_date_1 )
    )
RETURN
    CALCULATE (
        SUM ( 'Table'[values] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] = _latest_date_2 )
    )

 

Drag measure into visual.

vcgaomsft_2-1646618225293.png

Attach the PBIX file for reference. Hope it helps.

 

If this doesn't work for you, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.

 

It makes it easier to give you a solution.

  1. Sample (dummy dataset) data as text, use the table tool in the editing bar.
  2. Expected output from sample data.
  3. Explanation in words of how to get from 1. to 2.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

I create a sample with a date column and a value column.

vcgaomsft_3-1646618258958.png

Then create a measure.

 

The latest data =
VAR _latest_date_1 =
    MAX ( 'Table'[Date] )
VAR _latest_date_2 =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] < _latest_date_1 )
    )
RETURN
    CALCULATE (
        SUM ( 'Table'[values] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] = _latest_date_2 )
    )

 

Drag measure into visual.

vcgaomsft_2-1646618225293.png

Attach the PBIX file for reference. Hope it helps.

 

If this doesn't work for you, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.

 

It makes it easier to give you a solution.

  1. Sample (dummy dataset) data as text, use the table tool in the editing bar.
  2. Expected output from sample data.
  3. Explanation in words of how to get from 1. to 2.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

 

amitchandak
Super User
Super User

@Anonymous , Create this column in the date table and save that as the value in slicer /filter

 

Lastest = if([Date] = max(Table[Date]) , "Latest", [Date] )

 

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.