Forum Discussion
SEAM_98
2 years agoFrequent Visitor
Problem getting data from one table to another table in the range between dates
I have problems to create a column as inputs coming from different tables. It does not pull data from the other tables. I would like to know if you have any way to solve this problem. Here is som...
- 2 years ago
SEAM_98
I modifed the code with a different approach:MES_CUOTA = VAR _data = 'FACT COTIZACIONES'[FECHA DE CONFIRMACION DE RECEPCION DE LA OC DEL CLIENTE] VAR _result = MAXX( FILTER( 'DIM MES', _data >= 'DIM MES'[Fecha Inicio] && _data <= 'DIM MES'[Fecha Fin] ), 'DIM MES'[MES_CUOTA] ) RETURN _result
Fowmy
Super User
2 years agoSEAM_98
Add a calculated column to your Table 2 using the following code:
MES_CUOTA_COL =
VAR __Data = table2[FECHA DE CONFIRMACION DE LA OC DELL CLIENTE]
VAR __Result =
CALCULATE (
MAX ( table1[MES_CUOTA ),
table1[Fecha Inicio] <= __Data,
table1[Fecha Fin] >= __Data
)
RETURN
__Result
SEAM_98
2 years agoFrequent Visitor
Hi Fowmy
I don't know only works for the year 2023. The others previous years don't work :c. For example,
But with 2023, it works.
I tried moving the data (only the dates from my table, Mes cuota) in another spreadsheet and it worked. I understand the my table has some issues.
I check and those fields are with the correct format.
I don't know how can I fix it.
This is my table from mes_cuota
Please your help. I moved sensitive information in order to give you, but when I run the code It worked. I don't know why.