Forum Discussion
nicholas058
2 years agoFrequent Visitor
Creating a Measure/Column Which Shows the Most Recent Value and one which shows the Oldest
Good Morning, My first post on this forum, so I apologize if I'm not wording the question appropriately. However, I'm struggling to figure this out based on the existing articles I've looked at,...
nicholas058
2 years agoFrequent Visitor
Hey there, this was super helpful, however I'm running into another issue! It refuses to aggregate these totals. As you see in the example above, the totals are just the last line. I need to know the total sum of these changes.
In my report....
For sample data, you can still use the PBIX you provided above
lbendlin
2 years agoSuper User
you did not specify that requirement before. You will need to summarize by Line Name to get the totals.
Most Recent New Value =
var a = SUMMARIZE('Table','Table'[Line Name],"md",max('Table'[CreatedDate]))
var b = ADDCOLUMNS(a,"sm",var md = [md] return CALCULATE(max('Table'[NewValue]),'Table'[CreatedDate]=md))
return sumx(b,[sm])