Custom calc setps disappearing

samdthompson

New member
Joined
Aug 7, 2018
Messages
8
Reaction score
0
Points
1
Excel Version(s)
365
I wrote a custom column calc which worked fine. I then opened advanced editor copied and pasted the line of M a couple of times and altered the fields. As I step through the steps, the table is correct and all calculations are working but the previous step disappears.

....
#"Rename % of plant animal kill to animal +%" = Table.RenameColumns(#"Added Custom",{{"Bull", "Bull % of shift"}, {"Prime", "Prime % of shift"}, {"Cow", "Cow % of shift"}, {"Bobby", "Bobby % of shift"}, {"Lamb", "Lamb % of shift"}, {"Lamb to blast%", "Lamb % of shift to blast%"}, {"Mutton to blast%", "Mutton % of shift to blast%"}, {"Venison", "Venison % of shift"}}),
#"Bull slaughter (Budget AE * planned % of shift)" = Table.AddColumn(#"Rename % of plant animal kill to animal +%", "Bull slaughter (Budget AE * planned % of shift)", each (([#"BDG phased - .Bull Head"]*[#"Weekly plant species AE % of Island"])*[#"Bull % of shift"]*[Production day])),
#"Prime slaughter (Budget AE * planned % of shift)" = Table.AddColumn(#"Rename % of plant animal kill to animal +%", "Prime slaughter (Budget AE * planned % of shift)", each (([#"BDG phased - .Prime Head"]*[#"Weekly plant species AE % of Island"])*[#"Prime % of shift"]*[Production day])),
#"Cow slaughter (Budget AE * planned % of shift)" = Table.AddColumn(#"Rename % of plant animal kill to animal +%", "Cow slaughter (Budget AE * planned % of shift)", each (([#"BDG phased - .Cow Head"]*[#"Weekly plant species AE % of Island"])*[#"Cow % of shift"]*[Production day])),
....

For instance when I select the step "
Bull slaughter (Budget AE * planned % of shift)"
I see the correct calculation, when I select the step "
Prime slaughter (Budget AE * planned % of shift)" I see the correct calculation but do not see the column
Bull slaughter (Budget AE * planned % of shift)
. Its like I have deleted it but there is no step which does that.

I have tried
1. opening and closing
2. opening refreshing all, reloading, saving, closing, opening
3. Restarting

any ideas?
 
OMG, its too late in the day, my code was rubbish. beware copying and pasting. duh. I was busily naming the steps the same thing due to the copying and pasting eg:
Table.AddColumn(#"Rename % of plant animal kill to animal +%... again and again
. My bad. I will leave this here incase someone has the same problem and cocks up the same thing.
 
Back
Top