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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alexa_0028
Resolver II
Resolver II

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 -

alexa_0028_0-1638200269294.png

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"))
alexa_0028_0-1638203268490.png


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 1
amitchandak
Super User
Super User

@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"))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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