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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
derekmac
Helper I
Helper I

DAX Look Up Value

Hi All

I have picked up another persons report and come across the below Code, would someone be able to give me a brief indication of what this code is doing? Not seen the LOOKUPVALUE function used before 😞

Resourced EDV by Association = 
IF (
    'placements'[Role] = "Resourcer",
    IF (
        LOOKUPVALUE (
            'placements'[UserID],
            'placements'[PlacementID], 'placements'[PlacementID],
            'placements'[Role], "Deliverer"
        ) = 'placements'[UserID],
        0,
        LOOKUPVALUE (
            'placements'[EDV split],
            'placements'[PlacementID], 'placements'[PlacementID],
            'placements'[Role], "Deliverer"
        )
    )
)
3 REPLIES 3
derekmac
Helper I
Helper I

Apologies, didn't say that this was a Calculated Column

Wanted to understand what it is doing

tamerj1
Super User
Super User

Hi @derekmac 
Please try

Resourced EDV by Association =
VAR CurrentUserID = 'placements'[UserID]
VAR CurrentRole = 'placements'[Role]
VAR CurrentPlacementTable =
    CALCULATETABLE (
        'placements',
        ALLEXCEPT ( 'placements', 'placements'[PlacementID] )
    )
VAR DelivererTable =
    FILTER ( CurrentPlacementTable, 'placements'[Role] = "Deliverer" )
VAR UserID =
    MAXX ( DelivererTable, 'placements'[UserID] )
VAR EDVSplit =
    MAXX ( DelivererTable, 'placements'[EDV split] )
RETURN
    IF (
        'placements'[Role] = "Resourcer",
        IF (
            COUNTROWS ( DelivererTable ) > 1,
            "MultiDeliverer",
            IF ( UserID = CurrentUserID, 0, EDVSplit )
        )
    )

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.