Forum Discussion
Measure and Filter Context
Hi felipevaz ,
You can create columns using DAX below.
SumFixedValue = CALCULATE(SUM(DataExample[FixedValue]),FILTER(ALLSELECTED(DataExample),DataExample[Subcategory]=EARLIER(DataExample[Subcategory])))
SumOfDynamicValue = CALCULATE(SUM([DynamicValue]),FILTER(ALLSELECTED(DataExample),DataExample[Subcategory]=EARLIER(DataExample[Subcategory])))
Divide = DIVIDE([SumOfDynamicValue],[SumFixedValue])
Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EfwXUnVLxzFLgkHPKk2UeOcBO2VbjtEW_-pdA7LAyzl7Ww?e=O7eoae
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- felipevaz7 years agoHelper I
The expected result using the Data Example:
SumOfFixedValue: 16+20+24 = 60
Final Result
SubCategory
DynamicValue
Average(DynamicValue/SumOfFixedValue) aa
36
36/60 = 0,60
bb
35
35/60 = 0,58
cc
36
36/60 = 0,60