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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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