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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
titanic123
Helper I
Helper I

Latest Date based on two tables multiple columns

Hi All, I have get the latest data based on 2 tables. Please find below sample date:

my DAX applying filter only on table1, Please help me use the filter on both tables.

 

Table1 Table2 
EmployeeLatest DateUsed location Skills Performed
EMP12021-01Center1 Skill1 
EMP12021-02Center1 Skill2 
EMP12021-01center2 Skill2 
EMP12021-04center3 Skill1 
EMP22021-05center4 Skill4 
EMP22021-01Center1 Skill1 
EMP22021-02Center1 Skill2 
EMP22021-03center1 Skill1 
EMP22021-04center5 Skill2 
EMP22021-05center6 Skill2 
      
I need result as below :    
 Skill1Skill2Skill3Skill4 
EMP12021-042021-02 2021-05 
EMP22021-032021-05   

Max date =
var CurrentName = SELECTEDVALUE('Table1'[Employee])
Return MAXX( Filter (ALL ('Table1'),'Table1'[Employee] = CurrentName),
(max('Table1'[Latest Date])))

 

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@titanic123  use this measure

smpa01_0-1641786064970.png

Measure = CALCULATE(MAX('Table'[Latest Date]),ALLEXCEPT('Table','Table'[Employee],'Table'[Skills Performed]))
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
titanic123
Helper I
Helper I

Hi, Thanks a lot for your responce. i am getting the following Error : Cannot convert value of type Text to type True/False. Please find below sample dataset and expected results. I need Latest date where visit count >0

titanic123_0-1643321968471.png

 

 

 

 

v-angzheng-msft
Community Support
Community Support

Hi, @titanic123 

Can't decide the columns of the two tables, what is the data of table 2? Could you post the data from each of the two tables? Is the above post helpful to you?
Based on the data above, employee 1 does not have skill 4, while employee 2 has skill 4.

 

It makes it easier to give you a solution.

  1. Sample (dummy dataset) data as text, use the table tool in the editing bar
  2. Expected output from sample data
  3. Explanation in words of how to get from 1. to 2.

 

 

Best Regards,
Community Support Team _ Zeon Zheng

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

smpa01
Super User
Super User

@titanic123  use this measure

smpa01_0-1641786064970.png

Measure = CALCULATE(MAX('Table'[Latest Date]),ALLEXCEPT('Table','Table'[Employee],'Table'[Skills Performed]))
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.