Forum Discussion
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 | ||||
| Employee | Latest Date | Used location | Skills Performed | ||
| EMP1 | 2021-01 | Center1 | Skill1 | ||
| EMP1 | 2021-02 | Center1 | Skill2 | ||
| EMP1 | 2021-01 | center2 | Skill2 | ||
| EMP1 | 2021-04 | center3 | Skill1 | ||
| EMP2 | 2021-05 | center4 | Skill4 | ||
| EMP2 | 2021-01 | Center1 | Skill1 | ||
| EMP2 | 2021-02 | Center1 | Skill2 | ||
| EMP2 | 2021-03 | center1 | Skill1 | ||
| EMP2 | 2021-04 | center5 | Skill2 | ||
| EMP2 | 2021-05 | center6 | Skill2 | ||
| I need result as below : | |||||
| Skill1 | Skill2 | Skill3 | Skill4 | ||
| EMP1 | 2021-04 | 2021-02 | 2021-05 | ||
| EMP2 | 2021-03 | 2021-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
- smpa01Community Champion
Anonymous use this measure
Measure = CALCULATE(MAX('Table'[Latest Date]),ALLEXCEPT('Table','Table'[Employee],'Table'[Skills Performed])) - v-angzheng-msftCommunity Support
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.
- Sample (dummy dataset) data as text, use the table tool in the editing bar
- Expected output from sample data
- Explanation in words of how to get from 1. to 2.
Best Regards,
Community Support Team _ Zeon ZhengIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot 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