Forum Discussion
Help with lookup from SELECTEDVALUE
Sorry updated link to shared access
I don't understand how you arrive at the 1/3/3 Cohort logic. Please elaborate.
And to be clear - this can only be done via a measure, it is not possible to create a calculated table from a slicer selection.
- gsed992 years ago
Helper III
I've got this working via a calculated table and measure, but now I want to join in opportunity data which is joined to my account table. The problem is when I add the measure in with opportunity data it fails. Would that be a join issue or do I need to modify my measure to incorporate values from the opportunity table?
This setup works fine but only when using the Account Details table.
Table:Cohort =FILTER (VALUES ( 'Account Details'[Account Number] ),NOT ISBLANK ( 'Account Details'[Account Number] ))Measure:Cohort =var _account=CALCULATE(MAX('Account Details'[Account Number]),FILTER(ALLSELECTED('Account Details'),[Account Number]=SELECTEDVALUE('Cohort'[Account Number])))var _country=CALCULATE(MAX('Account Details'[Shipping Country]),FILTER(ALLSELECTED('Account Details'),[Account Number]=SELECTEDVALUE('Cohort'[Account Number])))var _industry=CALCULATE(MAX('Account Details'[Industry]),FILTER(ALLSELECTED('Account Details'),[Account Number]=SELECTEDVALUE('Cohort'[Account Number])))var _Ent_Country=CALCULATE(MAX('Account Details'[Ent Name + Country]),FILTER(ALLSELECTED('Account Details'),[Account Number]=SELECTEDVALUE('Cohort'[Account Number])))var _Enterprise=CALCULATE(MAX('Account Details'[Enterprise Account Name]),FILTER(ALLSELECTED('Account Details'),[Account Number]=SELECTEDVALUE('Cohort'[Account Number])))var _Reg_Industry=CALCULATE(MAX('Account Details'[Region + Industry]),FILTER(ALLSELECTED('Account Details'),[Account Number]=SELECTEDVALUE('Cohort'[Account Number])))RETURN IF(MAX('Account Details'[Account Number])=_account,"1 - Account Match",IF(MAX('Account Details'[Ent Name + Country])=_Ent_Country,"2 - Ent + Country",IF(MAX('Account Details'[Enterprise Account Name])=_Enterprise,"3 - Ent Name",IF(MAX('Account Details'[Region + Industry])=_Reg_Industry,"4 - Region + Industry",IF(MAX('Account Details'[Industry])=_industry,"5 - Industry","Other")))))- lbendlin2 years ago
Super User
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.- gsed992 years ago
Helper III
Thanks, please see link below with example file and dummy data
https://docs.google.com/spreadsheets/d/1B4k8l4CqzTWZKTpy4ImLyyQYiay1La_E/edit?usp=drive_link&ouid=101365232872831011168&rtpof=true&sd=true