Forum Discussion
amaniramahi
Helper V
5 years agoDATESBETWEEN with ALL Function
I need to calculate Year Over Year results for the same periods I used the following code YOY% =
var UptoDate = MAX('Monthly Reg Data'[Sales Month])
var CY = Year(UptoDate)
var PY = C...
- 5 years ago
Sorry, It was my mistake
I figured it out
Mikelytics
Resident Rockstar
5 years agoHi amaniramahi ,
Did you try working with TOTALYTD and SAMEPERIODLASTYEAR?
totalYTD = TOTALYTD(SUM(fact_table_m[Sales]),'Date'[Date],ALL('Date'[Date]),"12/31")
total_YTD_previous_year = TOTALYTD(SUM(fact_table_m[Sales]),SAMEPERIODLASTYEAR('Date'[Date]),ALL('Date'[Date]),"12/31")
I hope this is the expected result.
Best regards
Mikelytics
Did I solve your request? PLease mark my post as solution.
Appreciate your Kudos.
- amaniramahi5 years ago
Helper V
Thank you but that did not solve the problem.
I still have PYSales as Blank
Date column i am using in time int. functions is the same column i am using in the the slicer.
so I need to remove its effect on PYSales variable calculation only using ALL function but I stil dont know how to use it.