I have a two linked tables and want to calculate related value from one table by last date from another table but CALCULATE function always do it somehow wrong...
I'm trying to use this formula:
CALCULATE(VALUES('First table'[column2]),FILTER(ALL('First table'),LASTDATE('Second table'[column1])))
It doesn't work at all and when I'm trying to debug it by changing it to calculate countrows it always show the wrong number (37 instead of just 1):
CALCULATE(COUNTROWS(VALUES('First table'[column2])),FILTER(ALL('First table'),LASTDATE('Second table'[column1])))
Any ideas? What am I doing wrong?
I'm trying to use this formula:
CALCULATE(VALUES('First table'[column2]),FILTER(ALL('First table'),LASTDATE('Second table'[column1])))
It doesn't work at all and when I'm trying to debug it by changing it to calculate countrows it always show the wrong number (37 instead of just 1):
CALCULATE(COUNTROWS(VALUES('First table'[column2])),FILTER(ALL('First table'),LASTDATE('Second table'[column1])))
Any ideas? What am I doing wrong?