Forum Discussion
DAX - conditional filters using several column
- 3 years ago
NathalieM , You need a solution like
Last Qty = Var _max = maxx(filter( ALLSELECTED(Data1), Data1[Academic Year] = max(Data1[Academic Year]) && Data1[Speciality] = max(Data1[Speciality]) && Data1[Student] = max(Student]) ),Data1[Day])
return
CALCULATE(Max(Data1[Level]), filter( ALLSELECTED(Data1), Data1[Academic Year] = max(Data1[Academic Year]) && Data1[Speciality] = max(Data1[Speciality]) && Data1[Student] = max(Student]) && Data1[Day] =_max ) )Refer Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Thanks a lot Amitchandak.
I have to admit I am not sure I understand fully the formula (why we use max into the filters to allows for a MAXX specific for the student year and specialty), but this worked really nice! I will keep it in mind and use it more in my analysis! Have a great day!