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
HusseinKhalil
Helper I
Helper I

Previousmonth calculation showing blank

Hi,

 

i am using the below for previousmonth calculation, but result is always blank.

Syntax: 

PreviousMonth = CALCULATE(SUM('Monthly Speed - All Operators b'[Download Speed Mbps]),PREVIOUSMONTH('Monthly Speed - All Operators b'[Aggregate Date]))
 
sample for the dataset in the below link
 
 
PME.png
1 ACCEPTED SOLUTION

@HusseinKhalil 

 

PreviousMonth =
CALCULATE (
    SUM ( 'Monthly Speed - All Operators b'[Download Speed Mbps] ),
    PREVIOUSMONTH ( 'Monthly Speed - All Operators b'[Aggregate Date].[Date] )
)

 

03.JPG

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

View solution in original post

5 REPLIES 5
nandukrishnavs
Community Champion
Community Champion

@HusseinKhalil 

 

This is because of the date hierarchy. 

 

o1.JPG

o2.JPG

 

PreviousMonth =
CALCULATE (
    SUM ( 'Monthly Speed - All Operators b'[Download Speed Mbps] ),
    PREVIOUSMONTH ( 'Monthly Speed - All Operators b'[Aggregate Date].[Date] )
)

 

03.JPG



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

thanks you nandu, but it worked now, but i noticed that aggregate date format inside matrix changed.= and not showing year/month any more. 

 

is there a way to handle this and keep the format as it is?

@HusseinKhalil , best way is use date table for this

PreviousMonth = CALCULATE(SUM('Monthly Speed - All Operators b'[Download Speed Mbps]),PREVIOUSMONTH('Date'[Date]))

 

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 :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

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

@HusseinKhalil  - Yes I have modified the above reply. Please check that.


Regards,
Nandu Krishna

@HusseinKhalil 

 

PreviousMonth =
CALCULATE (
    SUM ( 'Monthly Speed - All Operators b'[Download Speed Mbps] ),
    PREVIOUSMONTH ( 'Monthly Speed - All Operators b'[Aggregate Date].[Date] )
)

 

03.JPG

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors