Forum Discussion
Anonymous
5 years agoNot applicable
Select data according to certain date
Hi everyone, I would ask for your support and knowledge to help me to solve this topic. I have a set of prices, for few contracts, launched in some dates. I need to filter all the items which its ...
Anonymous
5 years agoNot applicable
Hi camargos88 ! Thanks for your answer. I think that may succeed, but the date should be the MAX in the Date column, instead of static. I know well, that October 30th is the latestet in the example, but the data model will be updated on a daily basis.
Cheers
camargos88
Community Champion
5 years agoAnonymous ,
You can replace this block with:
CALCULATE(MAX(TABLE[DT_DATE]), ALL(TABLE))
- Anonymous5 years agoNot applicable
Hi camargos88 ! Sorry for the late feedback, but I'm just today coming back to this. I've tried:
ContratosVivos =VAR _date = DATE(SELECTEDVALUE(UDM_DMO_FORWARD_VALOR[Ano_Contrato]), SELECTEDVALUE(UDM_DMO_FORWARD_VALOR[UDM_DMO_TIPO_CONTRATO.FIM]), 1)RETURN IF(_date >= (CALCULATE(MAX(UDM_DMO_FORWARD_VALOR[DATA_COTACAO]), ALL(UDM_DMO_FORWARD_VALOR))),1,0).The outcome is still returning items with all the months from 2020, and it should be all the forward months comparing to the latest date from the query.What do you suggest to correct this?Thanks once more!- camargos885 years ago
Community Champion
Anonymous ,
você pode colocar uma massa de dados aqui como exemplo ?
- Anonymous5 years agoNot applicable
DATA_COTACAO Ano_Contrato VALOR CONTRATO_TIPO Mês Contrato 22-08-2012 2012 943 Ago 3 22-08-2012 2012 938 Set 3 22-08-2012 2012 949 Q4 3 22-08-2012 2013 972 Q1 3 22-08-2012 2013 988 Q2 3 22-08-2012 2013 10135 Q3 3 22-08-2012 2013 104 Q4 3 22-08-2012 2014 10855 Cal 3 22-08-2012 2015 11345 Cal 3 22-08-2012 2012 894 Ago 4 22-08-2012 2012 8895 Set 4 03-11-2020 2021 646 Q4 4 03-11-2020 2021 6427 Q3 4 03-11-2020 2021 6408 Q2 4 03-11-2020 2021 6343 Q1 4 03-11-2020 2021 6275 Jan 4 03-11-2020 2020 6215 Dez 4 03-11-2020 2020 6125 Nov 4 03-11-2020 2032 6572 Cal 3 03-11-2020 2031 6572 Cal 3 03-11-2020 2030 6572 Cal 3 03-11-2020 2029 6572 Cal 3 03-11-2020 2028 6572 Cal 3 03-11-2020 2027 6572 Cal 3 03-11-2020 2026 6572 Cal 3 03-11-2020 2025 6346 Cal 3 03-11-2020 2024 619 Cal 3 03-11-2020 2023 6015 Cal 3 03-11-2020 2022 5685 Cal 3 03-11-2020 2021 5451 Cal 3 03-11-2020 2021 5635 Q4 3 03-11-2020 2021 5515 Q3 3 03-11-2020 2021 5362 Q2 3 03-11-2020 2021 5292 Q1 3 03-11-2020 2021 5245 Jan 3 03-11-2020 2020 518 Dez 3