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.
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
96 | |
80 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |