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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
IfaZ_1
Helper I
Helper I

How to Calculate Previous Month

Hi, I'm trying to calculate the previous month tickets using previousmonth function but it is showing blank. I'm not sure what is wrong. Pleaseeeee help me outttt 😥

IfaZ_1_0-1725604358237.png

 

my desired out put would be:

 

IfaZ_1_1-1725604447397.png

 

link of the dashboard: https://we.tl/t-c1KCSIintH

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @IfaZ_1 ,

 

Try the expression:

vtianyichmsft_0-1725861743169.png

MoM Total Ticket = var _t = ADDCOLUMNS('Page 1',"Pre",SUMX(FILTER(ALL('Page 1'),YEAR([Date])=YEAR(EARLIER([Date]))&&[MonthNum]=EARLIER([MonthNum])-1),[Total Tickets]))
RETURN MAXX(_t,[Pre])

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@IfaZ_1 , First make sure you have one separate date table for this then use PREVIOUSMONTH and reference date table date and create relation with your table

 

PreviousMonthTickets =
CALCULATE(
COUNTROWS(TicketsTable),
PREVIOUSMONTH(DateTable[Date])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Why COUNTROWS? I have make a measure of total tickets. 

IfaZ_1_0-1725759817768.png

 

Anonymous
Not applicable

Hi @IfaZ_1 ,

 

Try the expression:

vtianyichmsft_0-1725861743169.png

MoM Total Ticket = var _t = ADDCOLUMNS('Page 1',"Pre",SUMX(FILTER(ALL('Page 1'),YEAR([Date])=YEAR(EARLIER([Date]))&&[MonthNum]=EARLIER([MonthNum])-1),[Total Tickets]))
RETURN MAXX(_t,[Pre])

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.