Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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])))

 

  • Anonymous  use this measure

    Measure = CALCULATE(MAX('Table'[Latest Date]),ALLEXCEPT('Table','Table'[Employee],'Table'[Skills Performed]))

3 Replies

  • smpa01's avatar
    smpa01
    Community Champion

    Anonymous  use this measure

    Measure = CALCULATE(MAX('Table'[Latest Date]),ALLEXCEPT('Table','Table'[Employee],'Table'[Skills Performed]))
  • Hi, Anonymous 

    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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    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