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

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

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.