Forum Discussion
CraigBlackman
Helper III
10 years agoFuture dates displayed and should not be.
I have a simple table that list the date, net sales an previosu years sales using the following formula P/Y Sales = SUMX(DimDate,CALCULATE([Net Sales],DATEADD(DimDate[Date],-1,YEAR))). Probl...
- 10 years ago
This is what I have
= Table.SelectRows(#"Renamed Columns1", each [Date] <= DateTime.LocalNow()
elliotdixon
Responsive Resident
10 years agoHI CraigBlackman In my dates table I have a column
IsInCurrentYear = if(YEAR(NOW())= [Year],1,0)
You could add this to your dates table and then filter on it - something like
P/Y Sales = SUMX(DimDate,CALCULATE([Net Sales],DATEADD(DimDate[Date],-1,YEAR)),filter(DimDate,DimDate[IsInCurrentYear]=1))
ED