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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Getting Value from another Row

hey everyone im trying to do a report where i need to check if the values from "order1" appears in "ReturnId" is this happens i need to get the value of "PointId" from the row where "order1" is filled and put in where the "ReturnId" is the same (i did the example in Excel of what i expect as the result)

Postigo_0-1624649220415.png


PowerBi file 

Is there someway to do this?? Thanks

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Anonymous ,

 

the following calculated column should do the job:

Wanted PointID =
VAR vRowReturnID = Planilha1[ReturnId]
VAR vResult =
    CALCULATE(
        MAX( Planilha1[PointId] ),
        FILTER(
            Planilha1,
            Planilha1[order1] = vRowReturnID
        )
    )
RETURN
    IF(
        vRowReturnID <> BLANK(),
        vResult
    )

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
selimovd
Super User
Super User

Hey @Anonymous ,

 

the following calculated column should do the job:

Wanted PointID =
VAR vRowReturnID = Planilha1[ReturnId]
VAR vResult =
    CALCULATE(
        MAX( Planilha1[PointId] ),
        FILTER(
            Planilha1,
            Planilha1[order1] = vRowReturnID
        )
    )
RETURN
    IF(
        vRowReturnID <> BLANK(),
        vResult
    )

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

Perfect!! thanks a lot

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.