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.
Hello, I bring a hard task, hope something can help me. I will explain the simple task on excel first.
I start with a simple table like the picture below:
With pivot tables I summarize the amount of purchase and the weights. And with those two tables I can estimate weighted average price and variance like in the following pictures.
In Power BI the weighted price it was faster to calculate, I just wrote the following measurement
Precio Prom. Pond. = sum(Tabla1[Purchase Amount])/sum(Tabla1[Weight])
Then, with a Matrix I obtain the same result for the weighted prices.
My problem is with the variance. How can I use a measurement's value for a vendor Like 0.67 (A,January) and subtract a measurement total like 0.47.
It is the same measurement but with different level of aggregations. I tried different formulas but without success.
The idea is that if you use slicer to filter dates or vendors the table change and the varices as well.
If somebody pass for something similar it will be great if you can share it. THANK!
Solved! Go to Solution.
Hi @opittaluga,
Based on my test, you should be able to use the formula below to create a measure to calculate total [Precio Prom. Pond.], and then use it in other calculations in your scenario.
Total Precio Prom. Pond. = CALCULATE ( SUM ( Table1[Purchase Amount] ) / SUM ( Table1[Weight] ), ALL ( Table1[Vendor] ) )
Measure = [Precio Prom. Pond.] - [Total Precio Prom. Pond.]
Regards
Hi @opittaluga,
Based on my test, you should be able to use the formula below to create a measure to calculate total [Precio Prom. Pond.], and then use it in other calculations in your scenario.
Total Precio Prom. Pond. = CALCULATE ( SUM ( Table1[Purchase Amount] ) / SUM ( Table1[Weight] ), ALL ( Table1[Vendor] ) )
Measure = [Precio Prom. Pond.] - [Total Precio Prom. Pond.]
Regards
Thank you! The formula works great.
Hello, I bring a hard task, hope something can help me. I will explain the simple task on excel first.
I start with a simple table like the picture below:
With pivot tables I summarize the amount of purchase and the weights. And with those two tables I can estimate weighted average price and variance like in the following pictures.
In Power BI the weighted price it was faster to calculate, I just wrote the following measurement
Precio Prom. Pond. = sum(Tabla1[Purchase Amount])/sum(Tabla1[Weight])
Then, with a Matrix I obtain the same result for the weighted prices.
My problem is with the variance. How can I use a measurement's value for a vendor Like 0.67 (A,January) and subtract a measurement total like 0.47.
It is the same measurement but with different level of aggregations. I tried different formulas but without success.
The idea is that if you use slicer to filter dates or vendors the table change and the varices as well.
If somebody pass for something similar it will be great if you can share it. THANK!
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 |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |