Forum Discussion
Sindre_
2 years agoNew Member
Creating a Financial Report Excluding Internal Transactions in Power BI
I have a general ledger in Power Query. The general ledger is composed of ledgers from multiple companies. The goal is to create a financial report for the companies collectively. The financial re...
- Anonymous2 years ago
Hi Sindre_ ,
Please add a custom column like:if not List.Contains({3000..9999},[account.number]) then null else if List.Contains({3000..9999},[account.number]) and List.Contains(Table.SelectRows( #"Changed Type", each List.Contains({1501,2401}, [account.number]))[refNumber_SelskapID],[refNumber_SelskapID]) then 1 else 0Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- 2 years ago
let Source = your_table, internals = Table.SelectRows(Source, (x) => List.Contains({1501, 2401}, x[account.number])), rec = Record.FromList(List.Repeat({1}, Table.RowCount(internals)), internals[refNumber_SelskapID]), result = Table.AddColumn( Source, "Create this column", (x) => if x[account.number] >= 3000 and x[account.number] <= 9999 then Record.FieldOrDefault(rec, x[refNumber_SelskapID], 0) else null ) in result
AlienSx
2 years agoSuper User
let
Source = your_table,
internals = Table.SelectRows(Source, (x) => List.Contains({1501, 2401}, x[account.number])),
rec = Record.FromList(List.Repeat({1}, Table.RowCount(internals)), internals[refNumber_SelskapID]),
result = Table.AddColumn(
Source, "Create this column",
(x) =>
if x[account.number] >= 3000 and x[account.number] <= 9999
then Record.FieldOrDefault(rec, x[refNumber_SelskapID], 0)
else null
)
in
result