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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
jaltoft
Resolver I
Resolver I

Rolling 12 months %

Hello,

 

Can someone please help?

This is what I need (Ideally with the rolling showing accross a longer period but this is just a sample)-

YYYYMMunder 1hrTotalIn month %Rolling 12 %
01202245650091.20% 
02202267870096.86% 
03202248052092.31% 
04202256257897.23% 
05202257460095.67% 
06202258660097.67% 
07202259862096.45% 
08202261063096.83% 
09202262264097.19% 
10202263464598.29% 
11202264665099.38% 
12202265867098.21%96.61%

 

This is what I have -

Calculate([Total],DATESINPERIOD(Calendar_Powerquery[Date-clean],MAX(Calendar_Powerquery[Date-clean]),-12,MONTH))
I also have the same measure for Incidents under 1 hr.
The issue I get when I put the data into a table in Power Bi is I can get the in month figure but I need a rolling which is worked out by summing the last 12 months incidents under 1 hr and the totals and then dividing.
1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@jaltoft,

 

Try this measure. The tables have a relationship on the date column. The visual uses DimDate[YYYYMM].

 

Rolling 12 Month % = 
VAR vUnder1Hour =
    CALCULATE (
        SUM ( FactTable[under 1hr] ),
        DATESINPERIOD ( DimDate[Date], MAX ( DimDate[Date] ), -12, MONTH )
    )
VAR vTotal =
    CALCULATE (
        SUM ( FactTable[Total] ),
        DATESINPERIOD ( DimDate[Date], MAX ( DimDate[Date] ), -12, MONTH )
    )
VAR vResult =
    DIVIDE ( vUnder1Hour, vTotal )
RETURN
    vResult

 

DataInsights_0-1674934331527.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
jaltoft
Resolver I
Resolver I

Thanks @DataInsights 

DataInsights
Super User
Super User

@jaltoft,

 

Try this measure. The tables have a relationship on the date column. The visual uses DimDate[YYYYMM].

 

Rolling 12 Month % = 
VAR vUnder1Hour =
    CALCULATE (
        SUM ( FactTable[under 1hr] ),
        DATESINPERIOD ( DimDate[Date], MAX ( DimDate[Date] ), -12, MONTH )
    )
VAR vTotal =
    CALCULATE (
        SUM ( FactTable[Total] ),
        DATESINPERIOD ( DimDate[Date], MAX ( DimDate[Date] ), -12, MONTH )
    )
VAR vResult =
    DIVIDE ( vUnder1Hour, vTotal )
RETURN
    vResult

 

DataInsights_0-1674934331527.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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