Forum Discussion
DAX: relating a field from another table in a function
- 10 years ago
Neuro81 and ankitpatira
Sorry for the trouble, but I managed to fix it in the end
=(YEAR(Today())-YEAR(RELATED('Availability Calendar'[Date])))*12+MONTH(Today())-MONTH(RELATED('Availability Calendar'[Date]))
The problem is that I got lost with the number of parenthesis (how lame!) So I deconstructed the formula and use a replace function to make it work.
Wish I could delete this post altogether. Again sorry for wasting your time! :smileysad::smileymad:
Neuro81 and ankitpatira
Sorry for the trouble, but I managed to fix it in the end
=(YEAR(Today())-YEAR(RELATED('Availability Calendar'[Date])))*12+MONTH(Today())-MONTH(RELATED('Availability Calendar'[Date]))
The problem is that I got lost with the number of parenthesis (how lame!) So I deconstructed the formula and use a replace function to make it work.
Wish I could delete this post altogether. Again sorry for wasting your time! :smileysad::smileymad:
pmdci
Sometimes its best to talk it out.
Whenever I get stuck I usually take a walk and try not to think of the problem and a lot of the time the solution just comes.
Its good that you take the time to try and fix the problem yourself instead of just waiting till someone comes to help you!!