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
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
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.