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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
CJ0323
Helper I
Helper I

How to take the STD Deviation of 2 locations combined.

In my dataset I have a table that looks like this.

LocationSale#Shirts
A1$100
A2$225
A3$50
B1$125
B2$215
B3$75


 I want to take the STD deviation of several locations combined but I need a measure that will summarize the sale# for each instanc. For instance for Sale# 1 should be Location A+B ($100+125) then Sale# 2 should be (225+215) so on for how many ever sale# we have. Then after this combination/summarization we need to take the STDDEV. So it would look like this STDDEV( (225,440,125). How can I do this using measures? Keep in mind I will have a filter that will allow of 1 or multiple locations to be selected.

1 ACCEPTED SOLUTION
v-tianyich-msft
Community Support
Community Support

Hi @CJ0323 ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1718173568953.png

vtianyichmsft_1-1718173582330.png

Summarized Sales = SUMX(
    SUMMARIZE(
        'Table',
        'Table'[Sale#],
        "TotalSales", SUM('Table'[Shirts])
    ),
    [TotalSales]
)

STDDEV of Combined Sales = STDEVX.P(
    SUMMARIZE(
        'Table',
        'Table'[Sale#],
        "SummarizedSales", [Summarized Sales]
    ),
    [SummarizedSales]
)

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

View solution in original post

1 REPLY 1
v-tianyich-msft
Community Support
Community Support

Hi @CJ0323 ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1718173568953.png

vtianyichmsft_1-1718173582330.png

Summarized Sales = SUMX(
    SUMMARIZE(
        'Table',
        'Table'[Sale#],
        "TotalSales", SUM('Table'[Shirts])
    ),
    [TotalSales]
)

STDDEV of Combined Sales = STDEVX.P(
    SUMMARIZE(
        'Table',
        'Table'[Sale#],
        "SummarizedSales", [Summarized Sales]
    ),
    [SummarizedSales]
)

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors