Forum Discussion
Anonymous
3 years agoNot applicable
FIlter Line chart DAX Formula by 1 year
I have a DAX Measure as shown below SPLY INVoiced =
CALCULATE(
[Invoice Line Total],SAMEPERIODLASTYEAR('Date'[Date])) The goal is to filter the 1 yr that is added so that all the l...
- Anonymous3 years ago
After doing some extensive research, this is my answer
SPLY Sales Amount = IF(MONTH(TODAY()) >= SELECTEDVALUE('Date'[Month Num]) && YEAR(TODAY()) = SELECTEDVALUE('Date'[Year]), CALCULATE(Sum('Sales'[Price]),SAMEPERIODLASTYEAR('Date'[Date]) ),Blank())
darkinvader_
Resolver I
3 years agoHi Anonymous , You can use the below formula :-
Last Year Invoice Line Total =
VAR MaxDate = MAX('Date'[Date])
VAR LastYearEndDate = EOMONTH(MAX('Date'[Date]), -12)
VAR LastYearStartDate = EOMONTH(LastYearEndDate, -11)
RETURN
CALCULATE( [Invoice Line Total], FILTER( ALL('Date'), 'Date'[Date] >= LastYearStartDate && 'Date'[Date] <= LastYearEndDate ) )
Please do gives a thumbs up if you find it helpfull
- Anonymous3 years agoNot applicable
it says there is an error.
- darkinvader_3 years ago
Resolver I
Hi Anonymous ,
Could you please send a Screenshot or description of the error- Anonymous3 years agoNot applicable
i have used a different method and it works fine now.. Thanks though