Forum Discussion
Help with a LOOKUPVALUE
- 4 years ago
Ivancito111 or you can have small version of this:
Origen Lead = var __suborigen = LOOKUPVALUE( modelov2[Welcome GUID], 'modelov2'[Suborigen], 'TodoIntranet'[lead_pilot]) return IF ( __suborigen == BLANK(), CALCULATE ( MAX ( 'LeadsV2'[Suuborigen] ), TOPN ( 1, Filter ( 'LeadsV2', 'LeadsV2'[eMail] = 'TodoIntranet'[cliente_mail] ), 'LeadsV2'[Date], DESC ) ) , __suborigen )✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Ivancito111 try this
Origen Lead =
var __suborigen =
LOOKUPVALUE( modelov2[Welcome GUID],
'modelov2'[Suborigen],
'TodoIntranet'[lead_pilot])
return
IF ( __suborigen == BLANK(),
VAR __table = CALCULATETABLE ( 'LeadsV2', TREATAS ( VALUES ('TodoIntranet'[cliente_mail] ), 'LeadsV2'[eMail] ) )
VAR __maxDate = MAXX ( __table, [Date] )
RETURN MAXX ( FILTER ( __table , [Date] = __maxDate), [Suuborigen] ),
__suborigen
)
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡