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 ...
camargos88
Community Champion
5 years agoAnonymous ,
You can create a measure like this:
_Filter =
VAR _date = DATE(SELECTEDVALUE('Table'[Contract_Year]), SELECTEDVALUE('Table'[Contract_Month]), 1)
RETURN IF(_date >= DATE(2020, 10,30), 1, 0)
Use this measure to filter the visual.
- Anonymous5 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
- camargos885 years ago
Community Champion
Anonymous ,
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!