Forum Discussion
Calculated Columns Errors
Do you have a Calendar Table? And can you provide a little sample data?
- LEC10 years agoFrequent Visitor
Thank you for your help!
I pasted some data below. The reason there are two lines per week per item is that there are two different types. I did not include this column as I am just trying to get the overall cost per item at week 3. (so data from weeks 1-3 for both years).
This is very simple in excel...not sure how to do it in power bi! In my master set of data there are more items and obviously more weeks. A calculated column of sum(2015 dollars)/sum(2015 qty) just does it for the entire set of data.
Thank you!
FW Item 2015 Sales Dollars 2015 Sales Quantity (Cs) 2016 Sales Dollars 2016 Sales Quantity (Cs) 1 Apple $421.64 2 $386.38 2 1 Apple $1,684.02 8 $1,023.05 5 1 Banana $1,818.64 16 $1,350.06 12 1 Banana $3,159.63 22 $2,055.91 14 2 Apple $346.09 1 $370.49 2 2 Apple $1,277.96 7 $1,529.64 8 2 Banana $1,573.92 13 $1,522.50 13 2 Banana $2,979.03 20 $2,732.27 18 3 Apple $400.67 2 $411.08 2 3 Apple $1,770.67 9 $1,844.39 9 3 Banana $1,999.06 17 $1,812.70 15 3 Banana $4,307.94 28 $3,204.44 21 4 Apple $532.92 2 4 Apple $2,083.90 11 4 Banana $2,197.09 19 4 Banana $4,122.36 27 - LEC10 years agoFrequent Visitor
also, I do not have a calendar table, but could obviously create one, maybe using a hierarchy?
I've never needed to do that before when doing SQL dumped into Excel so just a bit confused!