Forum Discussion
PY YTD Measures
Hi All,
I have created below formula formula for calculation of Current Yeat Closed Account count and PY same count for Closed Account .
YTD–Closed Account = CALCULATE(COUNT(Accountt[AccountNumber]),DATESYTD(Accountt[OpenDate]),FILTER(Accountt,Accountt[Open Or Close?]="Close"))
PY YTD-Closed Account = CALCULATE(COUNT(Accountt[AccountNumber]),FILTER(Accountt,Accountt[Open Or Close?]="Close"),SAMEPERIODLASTYEAR(Accountt[OpenDate].[Date]))
OR
PY YTD-Closed Account1 = CALCULATE(COUNT(Accountt[AccountNumber]),FILTER(Accountt,Accountt[Open Or Close?]="Close"),PARALLELPERIOD(Accountt[OpenDate].[Date],-1,Year))
PY YTD-Closed Account and PY YTD-Closed Account1 getting the same out put. Even I have try for PREVIOUSYEAR() function but it show null value for Year filter.
I have added new column Open Year as per below calculation and set as Year filter at report page level.
Open Year = YEAR(Accountt[OpenDate])
But on basis of Year filter I will get same out put for [YTD–Closed Account] and [PY YTD-Closed Account] measures.
So required the correct calculation which will show me the correct count of [PY YTD-Closed Account] on the basis of Year and Month filter.
Hi Xiaoxin Sheng,
Thanks for your update.
I have added the DataDimension and set relation between respective tables. I have changed the measures calculation for date dim and got the expected output.
Regards,
Sanjay.
2 Replies
- AnonymousNot applicable
Hi SanjayZinjad,
It will be help if you share some sample data and screenshots about your formula.
Regards,
Xiaoxin Sheng
- SanjayZinjadFrequent Visitor
Hi Xiaoxin Sheng,
Thanks for your update.
I have added the DataDimension and set relation between respective tables. I have changed the measures calculation for date dim and got the expected output.
Regards,
Sanjay.