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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ljone153
Frequent Visitor

Moving 12 Month Sum

Hello, I have looked at multiple 12 month moving sum posts, but still havent been able to solve my problem. My Problem is that whenever I put in a 12 month moving sum formula, I get just the same number for all dates as seen below (far right). The following picture also shows one of my 12 month moving sums that I tried.

 

Capture1.PNG

 

Here is the other formula I tried.

 

Capture.PNG

 

Here is the table that I am trying to do the 12 month moving sum on (it is a calculated table):

 

Capture2.PNG

 

And here is my dim Date table for good measure (only use the MonthYear Column).

Capture3.PNG

 

If anyone can help me make sense of where I am going wrong, that would be a great help. If you need anymore information, feel free to ask. Thank you!

1 REPLY 1
Seward12533
Solution Sage
Solution Sage

When you see repeated values in all the rows its a dead givaway that the filter context your intending is not being applied. 

 

In this case your calculating based on results form the Policy Count table but that is not used in defining your table so the PowerBI is not applying the filter context implied by your visual.  While your measure is assigned a home table and shows there in the Fields Pane it not associated with any particular table in the data model.   Working with multiple fact tables is one of the most challenging things for people getting started in PowerBI. 

 

See this post where I go into how to ensure your filter context if correctly applied.  It include a basic example in a linked PowerBI worksheet that demonstrates the common approaches.  In your case setting one of your relationships to have crossfilter direction go both ways. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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