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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kg4u
Helper II
Helper II

Problem with Period Calcs

Hi,

 

I have read though many period solutions, and have tried several of the solutions presented on this forum, but I am still having a problem. I'm trying to create some period measures so that I can eventually create some change measures.  I am not getting any results for my Current Period and Prior Period calcutions.

 

kg4u_0-1665508417587.png

My calculations are:

Current Period = CALCULATE(SUM(Report[Product 1]),
FILTER(ALL('Calendar Table'),'Calendar Table'[Date]=MAX('Calendar Table'[Date])))

 

Prior Period = CALCULATE(SUM('Report'[Product 1]),
FILTER(ALL('Calendar Table'),'Calendar Table'[Date]=MAX('Calendar Table'[Date])-1))
 
The above calculations are showing that the syntax is valid.  I do have a Calendar Table in my model which is linked to my data table.  The Calendar Table is linked on the Date column from the Calendar Table to the Entry_Dt_Full_Dt on my data table.  The Entry_Dt_Full_Dt is the lowest date level I have in the data table. 
kg4u_1-1665508588263.png

What am I doing wrong?  Thanks for your guidance.

 

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @kg4u 

 

You can try the following methods.

Current Period = CALCULATE(SUM(Report[Product 1]),
FILTER(ALL('Calendar Table'),[Month No]=SELECTEDVALUE('Calendar Table'[Month No])))
Prior Period = CALCULATE(SUM('Report'[Product 1]),
FILTER(ALL('Calendar Table'),[Month No]=SELECTEDVALUE('Calendar Table'[Month No])-1))

vzhangti_0-1665544413613.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @kg4u 

 

You can try the following methods.

Current Period = CALCULATE(SUM(Report[Product 1]),
FILTER(ALL('Calendar Table'),[Month No]=SELECTEDVALUE('Calendar Table'[Month No])))
Prior Period = CALCULATE(SUM('Report'[Product 1]),
FILTER(ALL('Calendar Table'),[Month No]=SELECTEDVALUE('Calendar Table'[Month No])-1))

vzhangti_0-1665544413613.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.