All the below calculations are working fine. Problem i am facing is By default when teh user opens the report the chart should show current vs previous year without any selection (Current year YTD vs LY YTD and Current year sales vs Last year sales). All charts now show data only if year is selected in slicer. If i dont select anything the chart do not show anything. any ideas how i can show these.
Year, date, month are all coming from a seperate date table. used this to create a new table (Calendar = CALENDAR("01-01-2016","12-31-2018"))
Revenue +ve = 0-sum(Fact[Cost])
ThisPeriodLY = CALCULATE([Revenue +ve], FILTER(ALL('Calendar'), 'Calendar'[Year] = MAX('Calendar'[Year])-1), SAMEPERIODLASTYEAR('Calendar'[Date]))
YTD = TOTALYTD([Revenue +ve],'Calendar'[Date])
LY YTD = CALCULATE([YTD],SAMEPERIODLASTYEAR('Calendar'[Date]) )