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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.