Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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"
)
)
)
Apologies, didn't say that this was a Calculated Column
Wanted to understand what it is doing
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 )
)
)
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |