This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Good Morning! I have a problem with the fuction STDEV.S (standar devuation)
Data
|2|
|3|
|2|
|9|
|4|
|2|
|5|
In Excel I use the next formula =DESVEST.M(A1:A7), Result: 2.54483604.
In Power BI I have the next table affected with filters with the next formula DESVIACIÓN = CALCULATE(STDEV.S(FactVentas[CANTIDAD]),ALLSELECTED())
Result: 1.07
What is the error?
Thank you so much
Hi @felipeBI
Has your problem been solved ? If it has been solved, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @felipeBI
I think your problem lies in ALLSELECTED() .
ALLSELECTED() : Removes context filters from columns and rows in the current query, while retaining all other context filters or explicit filters. It keeps explicit filters and contexts other than row and column filters.
So you will include explicit filters and context in your calculations and the result is different from the result that from excel .
I created a sample without any filters and the result is same with the result that from excel .
Column = STDEV.S('Table'[value])
I have attached my pbix file ,you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @felipeBI ,
You issue is related with the context of the ALLSELECTED (check documentation) in this case when you do the all selected you are adding not only the ones that have values but also the ones that have 0, and other values that you are not seeing in filter context.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 25 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 48 | |
| 29 | |
| 23 | |
| 23 |