Forum Discussion
Daviejoe
Memorable Member
6 years agoDynamic Date in Calculate
Hi,
My measure below gives me the end of total for last year, which is what i need for now as the first iteration of my report will have a static front page.
However, I'm sure I'll get asked to make my calculation dynamic. How do I make my DATESYTD(ENDOFYEAR(DATEADD('Date'[Date], -1, YEAR )), "31/12" section of my code so it reflects one previous to the year selected in the Date Filter?
Measure =
CALCULATE (
COUNTROWS ( MyTable ),
FILTER ( MyTable, MyTable[MyColumn] = "Yes" ),
DATESYTD(ENDOFYEAR(DATEADD('Date'[Date], -1, YEAR )), "31/12")
)
5 Replies
- stevedep
Memorable Member
What is the table structure (which columns)?
Which tables used (Date Dimension)?How are they related?
Sample data,
What is your outcome on the sample data and what did you expect,
Your formula.
Preferably a pbi file with sample data, so we can make it work in the sample file and you will have no issues replicating it in your final solution.