Forum Discussion
Anonymous
5 years agoNot applicable
Exclude current row from calculation
Hi. I need to do the following. I have a table of, say, products sold. Each row shows the selling price. It also shows the profit (selling price minus cost.) The bottom of the table shows the total p...
Anonymous
5 years agoNot applicable
You could try:
ExCurrentRow = let tbl = PriorStepName, ThisItem = each [ItemID],
Ex = Table.SelectRows(tbl, each [ItemID] <> ThisItem),
RevEx = List.Sum(Ex[Revenue]),
GPEx = List.Sum(Ex[GP$])
in
Table.AddColumn(PriorStepName, "GPExCurrentRow", each GPEx / RevEx)
--Nate
- Anonymous5 years agoNot applicable
Thanks Anonymous . Your solution seems to be using M Query. I need this to work at the visual level. Thanks so much for your response.