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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nhmpp
Helper I
Helper I

Standard Deviation by day of week, analysis by date

Hello! I am trying to work with the data below to basically divide the "total transactions" column (which is a count distinct of a list of order numbers), by the standard deviation for that specific weekday, which I built a measure for that is working as seen in the bottom right hand corner ( Code for it is:

AllStanDevTransactions = STDEVX.P (
    CALCULATETABLE (
        SUMMARIZE (
            LocationRevenues,
            LocationRevenues[starts_at_in_time_zone_Date],
            "TransCount", DISTINCTCOUNT(LocationRevenues[order_number_id] )
        )
    ),
    [TransCount]
)

 

 

When I create a measure that divides this total transactions column by the standard devaition calculation, (just a simple divide by the two measures) it shows blanks on every column.

 

A possible complication is that I want to be able to filter by different locations, and for the measures to recalculate each time. Everything is working up to this point, but I am not sure where the division of the two measures is going wrong. 

 

nhmpp_0-1666714048988.png

 

I want a result that looks like this, which I was easily able to do in Excel:

 

nhmpp_1-1666714438797.png

 

 

Eventually, I will need to do it the same way for the revenue portion of things, but think I can do that once I understand this. I appreciate any help!

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @nhmpp ,

 

According to my test, this issue may caused by the Measure [AllStanDevTransactions]. Please check if the value of date is 0.

vjianbolimsft_0-1666768424069.png

 

Besides, according to your description, the TransCount of a date only have one value, how to calculate the Standard Deviation? 

Could you please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

nhmpp
Helper I
Helper I

Update:

nhmpp_0-1666714682577.png

 

The measure showing the division is shown at the top. You can also see all the blanks, and that it is calculating one total for the measure at the bottom. I want it to calculate for each date though, and use the standard deviation of the specific corresponding week day. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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