Forum Discussion
aktripathi2506
Helper IV
9 years agoCalculating measure
Hi, Week Item Count of Item avg sale for that item 1 121 46 133 1 122 1 57 1 123 6 54 1 124 12 96 1 125 26 66 1 126 11 114 1 127 53 135 1 128 ...
GilbertQ
Super User
9 years agoHi aktripathi2506,
I would suggest if possible to always look at creating measures before storing the data in each column. Reason being is that if you want to the slice your data with another field, or possibly just get the average for each week, and remove the items, using the column method will mean that you have to create a new column. Which takes time, is not efficient and can cause performance problems in certain instances.
I solved your issue by creating the following measures:
Counts = SUM('Table1'[Count of Item])
Avgs = SUM('Table1'[avg sale for that item])
Output = DIVIDE([Counts],[Avgs]) - Formatted as %And this was the output, as you can see for the Table total it is the expected 18.92%, as well as you can have other visuals.