cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Poojad1 Member
Member

Averages For The Last 12 Months

last 12 month.PNG
Hello,
 I want to find out selected month to last 12 month sum also  filter them with different filters so i want that dynamic....
this is selected month count to last 12 month count sum.... 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Averages For The Last 12 Months

HI @Poojad1

 

PLease try this MEASURE

 

Last 12 Months sum =
IF (
    HASONEVALUE ( TableName[Month_Year] ),
    CALCULATE (
        SUM ( TableName[Count of personnel number] ),
        DATESINPERIOD (
            TableName[Month_Year],
            VALUES ( TableName[Month_Year] ),
            -12,
            MONTH
        )
    )
)
4 REPLIES 4
Super User
Super User

Re: Averages For The Last 12 Months

Seems like you could just create a measure that uses AVERAGE?

 

https://msdn.microsoft.com/en-us/library/ee634231.aspx


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

Proud to be a Datanaut!


Poojad1 Member
Member

Re: Averages For The Last 12 Months

I want rolling sum if i select jul-17 then last 12 month sum........

Super User
Super User

Re: Averages For The Last 12 Months

HI @Poojad1

 

PLease try this MEASURE

 

Last 12 Months sum =
IF (
    HASONEVALUE ( TableName[Month_Year] ),
    CALCULATE (
        SUM ( TableName[Count of personnel number] ),
        DATESINPERIOD (
            TableName[Month_Year],
            VALUES ( TableName[Month_Year] ),
            -12,
            MONTH
        )
    )
)
Poojad1 Member
Member

Re: Averages For The Last 12 Months

@Zubair_Muhammad thank you,,