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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Standard Deviation on items sold

Hello,

 

I want to calculate the Standard Deviation for a specific product

 

For that, I have a sales table from the last 180 days with daily granularity 

(Date, product, vendor, items sold)

If a product had 10 items sold in day 1 and 0 items sold in day 2, it will only show up in day 1.

 

For that reason, I need to know how to take in consideration in a measure the days without sales ?

In SQL, it is just a matter of doing a cross join between date dimension and sales table, and then apply the standard deviation formula. But, what about PBI ? How can I do it in a measure ?

 

Thanks a lot

Diego

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I want to take in consideration days without sales !!

 

View solution in original post

2 REPLIES 2
Shaurya
Memorable Member
Memorable Member

Hi @Anonymous,

 

You can use the FILTER function to avoid days without any sales from your calculations.

 

Example:

 

Measure = CALCULATE([Your Measure],FILTER('Table','Table'[Sales]=0))

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Graphical Comparison 

Anonymous
Not applicable

I want to take in consideration days without sales !!

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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