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
acplj
New Member

Calculate the value of the column that is a unique customer by the recent date

Good afternoon!

I am having difficulty adding the debit that is a single CLIENT with the most recent date.

 

DATE; CLIENT; DEBIT;
03/03/2019; 30050; 554.20
03/15/2019; 30050; 300.28
03/19/2019; 30050; 300.28
03/07/2019; 28440; 254.65
03/17/2019; 28440; 458.74

 

Result:
03/19/2019; 30050; 300.28
03/17/2019; 28440; 458.74

Thankful,

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Here's an option for a measure using variables

 

Most recent = 

var c = selectedvalue('Table'[CLIENT])

var d = calculate(max('Table'[DATE]),'Table'[CLIENT]=c)

return calculate(sum('Table'[DEBIT]),'Table'[CLIENT]=c,'Table'[DATE]=d)

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Here's an option for a measure using variables

 

Most recent = 

var c = selectedvalue('Table'[CLIENT])

var d = calculate(max('Table'[DATE]),'Table'[CLIENT]=c)

return calculate(sum('Table'[DEBIT]),'Table'[CLIENT]=c,'Table'[DATE]=d)

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.

Top Solution Authors