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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hasvine2022
Helper I
Helper I

Lastdate

Hello Team,

 

I need help creating a table to show the last balance for my products. My table looks like the below:

 

DateDescriptionBalance
11/11/2022A30
11/11/2022B25
10/11/2022C25
01/11/2022D20
20/10/2022A25
20/10/2022B20
19/10/2022C30
17/10/2022D21
08/09/2022A19
08/09/2022B19
07/09/2022C20
07/09/2022D18
07/09/2022E22

 

I need an answer like below:

 

DateDescriptionBalance
11/11/2022A30
11/11/2022B25
10/11/2022C25
01/11/2022D20
07/09/2022E22

 

I tried using the lastdate function but it is not working. Any idea?

 

Thank you.

 

Kind Regards,

 

Hasvine

1 ACCEPTED SOLUTION
AbbasG
Memorable Member
Memorable Member
4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @Hasvine2022 ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
FILTER(
    ALL('Table'),
    'Table'[Date]=MAXX(FILTER(ALL('Table'),'Table'[Description]=EARLIER('Table'[Description])),[Date]))

vyangliumsft_0-1668405354038.png

2. Result:

vyangliumsft_1-1668405354041.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

AbbasG
Memorable Member
Memorable Member

Hi AbbasG,

 

I appreciate your help.

 

It works fine. However, if you have two transactions on the same date the table shows both transactions.

 

Example:

 

DateDescriptionBalance
17/11/2022A25
17/11/2022A30

 

I need to show the latest. Is there a way?

 

Many thanks for your help.

 

Kind Regards,

 

Hasvine

 

 

 

@Hasvine2022 per my experience, there should be some data point basis on which we can identify the latest transaction. for example time stamp or a combination of date and time instead of just date.

 

Does your data have something like that??

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.