Forum Discussion
Calculate the average per category
- 6 years ago
Which calculations you have used.
In case you have used this, hope you created it is a measure, not Column
divide(sum(price),sum(qty))Please share the formula you created. It should be dynamic. Unless there is join missing. Or Interactions are off.
Thank you!
Using a measure instead of a column was the solution.
Like I said ... the answer was very simple.
I think i need to go back an review the differences between measures and columns.
Thanks again for the responses!
Columns are pre-calculated. You can see them in the table view. And the measure is calculated run time. means there will impact of data grouping.
For Multiple-use, We typically use column A*B and then SUM. This means we need a column. Sales Amount= QTY* Price and then Sum(Sales Amount)
For Divide, we need to do Sum(A)/Sum(B). Discount % = Sum(Discount)/Sum(Sales)*100. Means we need measure.
Refer the pbix on this article - https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814