I am unable to achieve the next DAX. I have 2 tables: Revenue and Type.
I want to display: "latest type", at the selected FY in a filter. (That is, if FY 20 is selected, the type shall be the one valid on 31-May-2020).
Revenue table:
Type table:
(Date is dd-mm-year)
When the user selects FY20, I would like to display all Revenue data like:
That is, on 31-May-2020, the valid Type was 3 for customer 15; and Type 2 for customer 492.
(When the user selects FY21, the same shall be displayed since on 31-May-2021, for customer 15 the valid Type was 3 and Type 2 for customer 492. )
When the user selects FY22, I want to display:
(on 31-May-2022, the valid Type was 6 for customer 15) (on 31-May-2022, the valid Type was 2 for customer 492)
and so on...
Is this possible? (I am also concerned performance-wise) (If this cannot be done in DAX, I can do it with a very large table in sql...)