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

Last 3 months from 3 years ago

Hi,

 

I have the below formula to give me total qty sold over the last 3 months.

 

Qty L3 = CALCULATE (
[TotalSalesQty],
DATESINPERIOD (
'Date'[Date],
EOMONTH(TODAY(),-1),
-3,
MONTH
))
 
What I need now is to get the total quantity sold for that same 3 month period, from 3 years ago. I've tried a range of things using parallelperiod, datesinperiod and datesbetween but just can't seem to get the results.
 
One I have tried is the below but it returns no data:
Qty L3 -3Yrs = CALCULATE (
[TotalSalesQty],
DATESINPERIOD (
'Date'[Date]
EOMONTH(TODAY(),-36), 
-3
MONTH
))
 
Thanks,
Michael
4 REPLIES 4
amitchandak
Super User
Super User

@mboucher_rcr , You have all the required dates in the date table. measn dat table should have date for at least last 39 month 

date table is marked as date table.

 

The date in fact do not have timestamp

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

I do seem to have a date table problem.

 

When I select the date table "Date" field to show on the report by itself, I see all dates from 1/1/2000 onwards.

 

If I select to show the date field from my sales data table by itself, I see all dates from when data began on 1/7/2007.

 

But when I select both date fields, the results are suddenly limited to starting at 1/7/2019.

 

What could be causing this limitation?

Never mind I have found the issue, it was the joins with some other tables that had data starting on 1/7/2019. Thanks!

@mboucher_rcr , Thanks for the update. Good, that issue is resolved.



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors