Hi,
I've attached a work book showing in excel what I would like to do in power query,
I have a budges for each row, and want to allocate it between each item in that row, so if A1 = 3 , B1 = 2 , A1 = ( Budget / 5 ) * 3
so;
List.Accumulate ( listA, Source, (S,C)=>
Table.TransformColumns( S, { C, (A)=> List.Count( Text.Split(A,",")) } ))
Gives the number of items in each cell, I can then sum these in addcolumns and divide
Table.AddColumn(Custom1, "allocation", each Number.Round ( [Budget] / List.Sum ( { [DepC],[DeptA], [DeptD], [DeptB]} ),2),type number )
I then need to multiply this by the number in each cell by this, I hope the excel table will show exactly what I'd like to do.
I have thought about using addcolumns 'standard' multiply' ? the query accerAllocation is the one I've got furthest with so far.
Richard.
Bookmarks