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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Ade108
Frequent Visitor

Parallelperiod -1 showing values from -3 months ago on Matrix table

Hi all,

 

I have a matrix table showing MoM variance between complaints received last month (-1) and the previous month (-2) as shown in the picture below. 

 

I've just discovered however that the 'Journey' rows highlighted in yellow were actually 0 complaints for December and the matrix is showing the last month when there was a complaint (October). 

 

The measures I have used to create this are:

 

MTD Complaints = TOTALMTD(SUM(Results[Complaint Count]), Results[case_created_dateonly])
 
Last Month = CALCULATE(MeasuresTable[MTD Complaints], PARALLELPERIOD(Results[case_created_dateonly],-1,MONTH))
 
Previous Month = CALCULATE(MeasuresTable[MTD Complaints], PARALLELPERIOD(Results[case_created_dateonly],-2,MONTH))
 
Can anyone advise where Im going wrong with this? I need the matrix to show '0' if there were no complaints received either last month or previous month.
 
Many thanks

 

 

Ade108_0-1672846767861.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ade108 , You should always use date table in measure, visual and slicer for such cases

 

examples 

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

 

Refer 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...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Ade108
Frequent Visitor

Thanks for such a quick response

 

I remember now that although I have a date table, it is marked as a date table and is linked to the fact table...when I try to use the DATESMTD measure it returns 'blank'.

 

I will watch those videos you have supplied - thanks

amitchandak
Super User
Super User

@Ade108 , You should always use date table in measure, visual and slicer for such cases

 

examples 

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

 

Refer 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...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I have just rechecked your advice and it now works - many thanks 🙂 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.