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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
smpatric
Frequent Visitor

TTM Calculation Failing with 0 Values

Hello,

 

I have a 12 Month Rolling Total Calculation (see below) that tracks the number of deals brought in on a monthly basis. The calculation works correctly until I try to slice by the Source fact, which allows the user to drill down into the employees that brought the deals in. The trouble seems to be that not all Sources bring in Deals every month, thus the value for that month would be 0, which causes the calculation to revert to the earliest value it can find (in this case, I'm only visualizing the previous 3 years, so it currently reverts to December 2016). This causes incorrect data to be displayed as well as odd spikes in the line graph that tracks the running total. Any idea why the 0 value would through off this calculation?

 

# Deals TTM = CALCULATE([Deals],ALL('Origination Date'[Date], 'Origination Date'[Month Year]),ALLEXCEPT(Deals,Deals[Platform/Add-On],Deals[Tier],Deals[Source Tier (Groups)],Deals[Sources]),DATESBETWEEN('Origination Date'[Date],NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE('Origination Date'[Date]))),LASTDATE('Origination Date'[Date])))

 

1 REPLY 1
smpatric
Frequent Visitor

After looking at the problem further, it looks like the calculation isn't reverting to a previous value, but summing all values when a given month is 0. I can't seem to figure out why the calculation works so long as there are values being added on a monthly basis. 

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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