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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.