Forum Discussion
RGR
3 years agoFrequent Visitor
Dynamic date
Hello everyone, I would like to ask the questions below, maybe someone can help. I have a table with the min & max outdoor temperature per day (since 1961). What I would like to display is the f...
RGR
3 years agoFrequent Visitor
Thank you very much for your reply!!
In the meantime, I created this yesterday:
-1- First of all i added an calculated column using this code:
Current month =
IF (
MONTH ( PowerBi[datum].[Date] ) = MONTH ( TODAY () )
&& (PowerBi[datum].[Dag]) <= Day(today() -1) ,
"Yes",
"No"
)
-2- Then I made this measure:
History aver-max =
CALCULATE(AVERAGE(PowerBi[max]), all(), (PowerBi[yearnr] = 2021),
FILTER(
VALUES('PowerBi'[Huidige maand]),
[Huidige maand] = "YES")
)
This works fine, but now I would like to make the "(PowerBi[yearnr] = 2021)" to
become dynamic, something like "(PowerBi[yearnr] = today(),-1 year)"
I cannot figure out how to do this, even not with the Edate you mentioned....
Help would be appreciated a lot.
Best regards RGR