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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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...

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.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.