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
tryingnewtools
Regular Visitor

TTM only if have 12 months data, else N/A

Hi,

 

I'm trying to create a measure that sum's the trailing's 12 month "Operating Income."

 

However, if there is not a full 12 months of prior "Operating Income" (i.e., only 6 months of data), then the result should be "N/A". 

 

How would be best to do this?

 

----

 

The measure below sums the 12 months, regardless...but returns the sum of the prior quarters, even if there are <12 months of data

 

_ Rolling TTM Operating Income = calculate([_ Total Operating Income], DATESINPERIOD(Calendar_Lookup[Date], MAX(Calendar_Lookup[Date])-1,-12,MONTH))

 

 

 

 

 

2 REPLIES 2
tryingnewtools
Regular Visitor

To give an example...

 

If below is the quarterly operating income data table

fundamental.PNG

 

The Rolling TTM Operating Income should show as "N/A", not as 51, because there is not 12 months of prior operating income. 

 

The Rolling TTM Operating Income column should only show rolling sum if there is 12 months of prior data in the operating income data table.

 

sum.PNG

 

Thank you!

 

Anonymous
Not applicable

@tryingnewtools,

I am not very clear about "there is not 12 months of prior operating income". What dates do you want to compare in your original table? You may need to create a new measure which looks like as below.

NewMeasure= If(Condition,[Rolling TTM Operating Income] ,"N/A")

Regards,
Lydia

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.