Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Previous YTD not showing appropriate value based on YTD

Hi,

 

I have a measure created as following:

Income General = CALCULATE(ABS([Net Amount]), AccountTransactions[Account Number]="1-1030-4114")
 
Note: Net amount used in above formula itself is a measure created as : Credit amount- debit amount.
 
Now, I am trying to display YTD and PYTD info for Income general in data card so created below formulas. Fiscal period runs from 9/30 to 10/1. 
 
Income general YTD = TOTALYTD([DCA General],'date table'[Date],"9/30")// put in year end date as 9/30.
Income General PYTD = CALCULATE([DCA Mgmt YTD],SAMEPERIODLASTYEAR('date table'[Date]))
 
I already have a date table configured in pbi desktop as one of the tables which includes fileds like Date, fiscal year, fiscal month no etc.
 
The PYTD is showing total or sum of entire fiscal year:2018 but I want it to show 2018 YTD in previous year. 
So this means let's say if YTD shows amount for the period (10/1/18- 3/20/19), I want the PYTD to show (10/1/17- 3/20/2018), this should then change dynamically as well. Any ideas on how to implement this?
Can anyone tell if I am doing anything wrong?
1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous 

 

Please check if this article could help you.You may try below measure.If it is not your case,please share some sample data which would be helpful to provide an accurate solution.You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Measure =
CALCULATE ( [DCA Mgmt YTD], PREVIOUSYEAR ( 'date table'[Date], "03/20" ) )

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @Anonymous 

 

Please check if this article could help you.You may try below measure.If it is not your case,please share some sample data which would be helpful to provide an accurate solution.You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Measure =
CALCULATE ( [DCA Mgmt YTD], PREVIOUSYEAR ( 'date table'[Date], "03/20" ) )

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.