cancel
Showing results for
Did you mean:
Regular Visitor

## Re: Finding value related to latest Date

Oh yes, sorry, I did it as a measure. I tried it as a column and it looks perfect! I never know when to use columns or measures.

Anyway, I think you've solved it. Thanks buddy!

Super Contributor

## Re: Finding value related to latest Date

Calculated Column :

It will occupy the space in RAM , So it was costly.

It will give u better performance rather then Measure.

Calculated Measure :

It will Execute an visual load Time.

No need space.

If u have better DAX , it will give u better performance.

My personal suggestion :

1. If u have less data go with Column.

2. Have huge data go with Measure.

Member

## Re: Finding value related to latest Date

Hi,

I'm trying to create a measure based on the solution you provided here, with a similar issue of the original poster., in that I want the latest, not the max on the latest date to be the result.

Am I correct in thinking the syntax for the measure you provided here is for the max price? How would I correct the following formula to give me just the latest?

Here's my example data:

Student ID; Package ID; sent_time

1; 1; 1/1/17

1; 2; 1/2/17

1; 4; 1/3/17

2; 2; 1/3/17

2; 4; 1/14/17

3; 1; 1/2/17

My two IDs are in text form. Want I want is a measure instead of a calculated column or table (I have two million rows and counting on this table, which has relationships with 4 other tables). So for this I would have Student ID 1, Package ID 4...Student ID2, Package ID 4, Student ID 3, Package ID 1 with only the Package IDs as the result.

Stop ID = var cur_student_id = CONCATENATEX('Packages', 'Packages'[Student ID],",")
var max_date = CALCULATE(MAX('Packages'[send_time]),
FILTER(ALL('Packages'), 'Packages'[Student ID]=cur_student_id))

var result = CALCULATE(MAX('Packages'[Package ID]),
filter(ALL('Packages'), AND('Packages'[send_time]=max_date, 'Packages'[Student ID]=cur_student_id)))

return result

I don't get an error running the formula, but when I try to put the results in a report, it doesn't run through. I think the issue is this? var result = CALCULATE(MAX('Packages'[Package ID]),

since I don't want the MAX Package ID, just what the Latest Package ID is for the latest date.

I hope I'm making sense!

Thanks for any help!

Betsy

Highlighted
Regular Visitor

## Re: Finding value related to latest Date

Hello @Framet ,

I appreciate you answer and it is quite helpful, but I need something slightly different. Instead of the latest price I need to pull the latest text input. Any ideas on how to handle this with text instead of numbers

ID, Action, Date

D9999 ,extension,12/09/2917

D9999 ,on board, 01/05/2015

D9999, off board, 01/01/2018

Announcements

#### New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

#### November 2019 Community Highlights

Get an overview of the events and great community content from November.

#### Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)