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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.