cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: PY YTD Measures

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.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: PY YTD Measures

Hi @SanjayZinjad,

 

It will be help if you share some sample data and screenshots about your formula.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: PY YTD Measures

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.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors