Forum Discussion
return last years DTD...
I need help bringing back lY DTD please!!
My DTD measure is correct and working and is as follows:
As for my LY DTD I am doing (just putting -1 after fy):
Thanks!
2 Replies
- daXtremeSolution Sage
If you want to calculate LY DTD, you first have to calculate the date range for DTD and then move this range one year back and apply this filter to the measure in question.
By the way, it's a DAX question, not Power Query, so technically you should have asked this question on a different forum.
- v-yalanwu-msftCommunity Support
Hi, lennyt99 ;
Try it .
LY DTD = IF ( HASONEVALUE ( 'Fiscal Year Conversion'[Fiscal Year] ), CALCULATE ( SUM ( 'Opportunity Tracker 2.0'[Annual Volume LBS] ), FILTER ( ALL ( 'Fiscal Year Conversion' ), 'Fiscal Year Conversion'[Fiscal Year] = MAX ( 'Fiscal Year Conversion'[Fiscal Year] ) - 1 && 'Fiscal Year Conversion'[Calendar Date] <= MAX ( 'Fiscal Year Conversion'[Calendar Date] ) ) ), BLANK () )If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
Solved: How to upload PBI in Community - Microsoft Power BI Community
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.