Forum Discussion

alexa_0028's avatar
alexa_0028
Resolver II
4 years ago

Select column value from table based on measure value

Hi ALL,

I have a scenario like below, where I want to display Contact Names only where the  "Last Trial Date" is as shown -

But, when I add the contact name dimension I see multiple last_trial_dates and contact names, how can I fix it to show only relevant information.
The DASX for last_trial_Date = 

calculate(max('Facts'[date]),FILTER('Activity Type',[Activity Type]="Trial"))


I only want to see highlighted value where the last_trial_date is as shown in image 1. If there are multiple contact names found only display the one with the value which is relevant.


Activity Type and Contact are 2 different dimension table, connected to facts table with star schema

1 Reply

  • alexa_0028 , Try a measure like

    Measure =
    VAR __id = MAX ('Table'[C_Account_name] )
    VAR __date = CALCULATE ( MAX('Table'[NUM] ), ALLSELECTED ('Table' ), 'Table'[C_Account_name] = __id )
    CALCULATE ( MAX ('Table'[Activity Contract] ), VALUES ('Table'[C_Account_name] ),'Table'[C_Account_name] = __id,'Table'[NUM] = __date ,FILTER('Activity Type',[Activity Type]="Trial"))