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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
PaulStaps
Frequent Visitor

Change in Values over Time - Calculated Column?

I have a table where ID's are changing over time for each client and and I want to display in a table on a report the change from original and most recent ID as shown below.  It would only ever need to show the original ID v the most recent ID as there wouldn't be multiple changes.  I've managed to pull the IDs into new columns using DAX for the max and min dates but I can't work out how to display those values in a table in a visual.  Any ideas?

 

(if(CALCULATE(MAX('Table A'[DATE]),FILTER('Table A','Table A'[CLIENT]='Table A'[CLIENT]))='Table A'[DATE],'Table A'[ID],BLANK()))

 

Table A

CLIENT   ID        DATE

AAA       123      1/1/19 

AAA       123      3/1/19

AAA       456      1/2/19

 

Table Visual

Original       New

123              456

 

Thanks

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@PaulStaps 

 

Try these Measures

 

Measure(NewID) = CALCULATE(max(TableName[ID]),LASTDATE(TableName[DATE]))

Measure(OldID) = CALCULATE(max(TableName[ID]),FIRSTDATE(TableName[DATE]))

Thanks Zubair, the problem with that is that it doesn't work in a table unless you include the ID aswell.  What I wanted ideally was to reflect just the original and new IDs in a table.  Any thoughts?

Hi @PaulStaps ,

It seems that the measure provided by Zubair_Muhammad could achieve your desired output like below.

Capture.PNG

If you still need help, please share the screenshot to describe your issue in details so that we could understand better.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.