Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hey all,
Since I want to add the attributes of coefficient of variance at SKU level, I want to calculate that as column not measure. (see below examples)
Coefficient of variance = standard deviation / average
Given that, i should calculate
1: the weekly average value based on how many weeks total for each item.
2: the standard deviation of value at SKU level
3: standard deviation / average
Do you know how to calculate that in the column? Since I finally want to pull some graph based on the attributes of coefficient of variance. So that one have to be calculated not the measure. Any thoughts? Thanks!
Solved! Go to Solution.
Hi @naoyixue1 ,
Please check if this is the output you want?
Column =
VAR _sku_total = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[SKU]=EARLIER('Table'[SKU])))
VAR _week_count = CALCULATE(DISTINCTCOUNT('Table'[Week]),FILTER(ALL('Table'),'Table'[SKU]=EARLIER('Table'[SKU])))
VAR _avg = DIVIDE(_sku_total,_week_count)
VAR _stdevx = STDEVX.S(FILTER(ALL('Table'),'Table'[SKU]=EARLIER('Table'[SKU])),'Table'[Value])
VAR _result = DIVIDE(_stdevx,_avg)
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
@Anonymous Thanks, Gao! It works for me.
Any thoughts?
Hi @naoyixue1 ,
Please check if this is the output you want?
Column =
VAR _sku_total = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[SKU]=EARLIER('Table'[SKU])))
VAR _week_count = CALCULATE(DISTINCTCOUNT('Table'[Week]),FILTER(ALL('Table'),'Table'[SKU]=EARLIER('Table'[SKU])))
VAR _avg = DIVIDE(_sku_total,_week_count)
VAR _stdevx = STDEVX.S(FILTER(ALL('Table'),'Table'[SKU]=EARLIER('Table'[SKU])),'Table'[Value])
VAR _result = DIVIDE(_stdevx,_avg)
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 124 | |
| 101 | |
| 67 | |
| 49 |