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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
IfaZ_1
Helper I
Helper I

Previous Month Calculation

Hi, 

 

I'm running a the end of blocked road here. I have tried several times and still my calculation didnt appear. 

this is the calculation I made : 

MoM Total Ticket =
    CALCULATE(
        [Total Tickets],
        PREVIOUSMONTH('FY Date'[Date])
    )
 
The result and my relationship tables
IfaZ_1_0-1725853906063.pngIfaZ_1_1-1725853957744.png

 

9 REPLIES 9
Anonymous
Not applicable

Hi @IfaZ_1 ,

 

Thanks to Irwan , Dangar332  and some_bih for their quick replies. I have some other thoughts to add:

(1) We can create a column on [FY Date] table.

Month_num = MONTH([Date])

(2) We can create a measure.

MoM Total Ticket = 
    CALCULATE(
        [Total Tickets],
        FILTER(ALL('FY Date'),[Month_num]=MAX('FY Date'[Month_num])-1)
    )

vtangjiemsft_0-1725958249800.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Dangar332
Super User
Super User

HI, @IfaZ_1 

Try below measure

MoM Total Ticket =
var previous_month = maxx(
filter(
all('FY Date'[Month]),
'FY Date'[Month]<min('FY Date'[Month])
))
return
 CALCULATE(
        [Total Tickets],
        'FY Date'[Month]=previous_month
    )

 

Best Regards,
Dangar

 

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

 

Hi Dangar, 

 

It is giving me this error 

 

IfaZ_1_0-1725862351693.png

 

MoM Total Ticket =
var previous_month = maxx(
filter(
all('FY Date'[Month]),
'FY Date'[Month]<min('FY Date'[Month])
),'FY Date'[Month])
return
 CALCULATE(
        [Total Tickets],
        'FY Date'[Month]=previous_month
    )

Hi Dangar, 

 

It is showing blank

IfaZ_1_0-1725864069003.png

 

hello @IfaZ_1 

 

i downloaded your sample file in your other post couple days ago.

 

i was meant to ask you, is there any reason you collect month from 'Page 1' tbl?

 

if you take month value from 'FY Date' tbl, you can see the result already.

Irwan_2-1725939716185.png

for your record, i didnt change any DAX, only change month value from 'Page 1' tbl to 'FY Date' tbl.

 

MoM SLA or MoM Totak Ticket use time intellegence value from 'FY Date' tbl so it might be the issue why it shows no value (i am not sure on this, but it does show the previous value).

Irwan_3-1725939932386.png

 

 

Hope this will help.
Thank you.

Because if I use the FY table my tickets number is not the same. 

 

IfaZ_1_0-1726209261300.png

 

some_bih
Super User
Super User

Hi @IfaZ_1 share measure definition for  [Total Tickets]





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






here is my measure for
 
Total Tickets = SUM('Page 1'[DNME]) + SUM('Page 1'[SLAEE]) + SUM('Page 1'[Open]) + SUM('Page 1'[SLAME])

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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