Forum Discussion
Search Part Cost
- 4 years ago
If the field types of the two tables are synchronized, it does not matter whether text or number.
Try this:
Column = VAR a = MAXX ( FILTER ( PART_COST_RATE, [PART_CODE] = EARLIER ( 'Table'[PART_CODE] ) && [EFECT_FROM_DATE] <= EARLIER ( 'Table'[MANUFACTURE DATE] ) ), [EFECT_FROM_DATE] ) RETURN MAXX ( FILTER ( PART_COST_RATE, [EFECT_FROM_DATE] = a && [PART_CODE] = EARLIER ( 'Table'[PART_CODE] ) ), [RATE] )Are you sure there are matching results in the two tables?
Best Regards,Community Support Team _ Janey
Hi, Yonatan1984
If the data type and the table structure are the same, it is logically impossible to have problems. Did you download my file and compare it with your source file? According to the sample you provided, we can only help you here unless you can provide further details.
I checked, and the format of part_code in the tables is text and the date format is date in short date.
I checked your model, and it seems that the part_code format in your model is whole number.
There's a screenshot:
- v-janeyg-msft4 years agoCommunity Support
If the field types of the two tables are synchronized, it does not matter whether text or number.
Try this:
Column = VAR a = MAXX ( FILTER ( PART_COST_RATE, [PART_CODE] = EARLIER ( 'Table'[PART_CODE] ) && [EFECT_FROM_DATE] <= EARLIER ( 'Table'[MANUFACTURE DATE] ) ), [EFECT_FROM_DATE] ) RETURN MAXX ( FILTER ( PART_COST_RATE, [EFECT_FROM_DATE] = a && [PART_CODE] = EARLIER ( 'Table'[PART_CODE] ) ), [RATE] )Are you sure there are matching results in the two tables?
Best Regards,Community Support Team _ Janey - Yonatan19844 years agoHelper I
- v-janeyg-msft4 years agoCommunity Support
There is my code in the sample I gave you at the beginning... It's okay now.
Best Regards,Community Support Team _ Janey