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
MG123
Regular Visitor

New coloumn from data of other rows

I am looking for help on the following problem:

 

In my table visual I want to add a new coloumn which displays the Date of the ID Predecessor. For example, in the rows with ID 487, the ID's 485 and 486 are preceding in each row I want the new coloumn to display the corresponding Date.

 

486    INF 1.3     14.02.2020     484       31.01.2020

487    INF 1.4     28.02.2020     485       14.02.2020

487    INF 1.4     28.02.2020     486       14.02.2020

488    INF 1.5     06.03.2020     487       28.02.2020

 

MG123_0-1653656920860.png

 

1 ACCEPTED SOLUTION
isabella
Employee
Employee

Hi @MG123 

You can create a column like this :

 

Column = CALCULATE(MAX('Table (3)'[DATE]),FILTER('Table (3)''Table (3)'[ID] = EARLIER('Table (3)'[ID PREDESESSOR] )))

 

isabella_0-1653990227203.png

 

 

 

Best Regards,

Community Support Team _Isabella

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

View solution in original post

2 REPLIES 2
isabella
Employee
Employee

Hi @MG123 

You can create a column like this :

 

Column = CALCULATE(MAX('Table (3)'[DATE]),FILTER('Table (3)''Table (3)'[ID] = EARLIER('Table (3)'[ID PREDESESSOR] )))

 

isabella_0-1653990227203.png

 

 

 

Best Regards,

Community Support Team _Isabella

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

Anonymous
Not applicable

 

Hi

 

This should works

var previd=selectedvalue(Table[ID])-1

var result=calculate(max(Table([Date]),Table([ID])=previd)

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.