Forum Discussion

Faculty's avatar
Faculty
New Member
3 years ago
Solved

STDEV with a datesinperiod

Hello everyone,

I'd like to do the equivalent of this =ECARTYPE(D8:O8) but in DAX.

In fact, I'd like to calculate the standard deviation of a row over a 12-month period.
As you can see on my print screen, I have a row of numbers and I'd like to get the standard deviation of those numbers. I've tested this in Excel and I've got 38, but I can't do it in DAX.
I've already calculated the average of these numbers.

 

Here's the average of each item.

Thanks for you help.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Faculty ,

    Please have a try.

    Create a measure.

    measure =
    STDEVX.S (
        FILTER (
            MyTable,
            MyTable[Date] >= DATEADD ( MyTable[Date], -12, MONTH )
                && MyTable[Date] <= MAX ( MyTable[Date] )
        ),
        MyTable[Value]
    )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Faculty ,

    Please have a try.

    Create a measure.

    measure =
    STDEVX.S (
        FILTER (
            MyTable,
            MyTable[Date] >= DATEADD ( MyTable[Date], -12, MONTH )
                && MyTable[Date] <= MAX ( MyTable[Date] )
        ),
        MyTable[Value]
    )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.