Forum Discussion
Populate Column Field on Fact Table with data from Multiple Tables based on priority in Power BI
- Anonymous4 years ago
Hi Anonymous ,
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.
Best Regards,
Stephen Tao
asume all the dimtable only have those 6 columns and the column sort is identical, then try below code
NewStep=Table.SplitColumn(Table.AddColumn(FactTable,"n",each let a=List.Zip(List.Transform({DimFinancialData1,DimFinancialData2,DimFinancialData3,DimFinancialData4},each Record.ToList(_{[Serial Number=[Serial Number]]}? ??[]))) in List.Transform(List.Positions(a),each if _=4 then List.Sum(a{_}) else List.Skip(a{_}_,(x)=>x=null or x=""){0}?) ,"n",each _,{"PO Number","Invoice Number","Lease Schedule Number","Net Values","Cost Center"})