Forum Discussion
Reference a dimension table column in PQE
- 10 months ago
Hi Anonymous ,
In your fact table, try using this code in a new custom column:
Table.SelectRows(Products, (dim) => dim[Product] = [Product])[PrepDays]{0}This will bring in the [PrepDays] value from the dim table against each matching value of Product in the fact table.
Depending on the size of the Products table, you may find that PQ has to scan the table many times to find matches. In this case, you can buffer the Products table to hold it in memory while scanning, avoiding the need for multiple loads:
Table.SelectRows(Table.Buffer(Products), (dim) => dim[Product] = [Product])[PrepDays]{0}Pete
Hi Anonymous ,
In your fact table, try using this code in a new custom column:
Table.SelectRows(Products, (dim) => dim[Product] = [Product])[PrepDays]{0}
This will bring in the [PrepDays] value from the dim table against each matching value of Product in the fact table.
Depending on the size of the Products table, you may find that PQ has to scan the table many times to find matches. In this case, you can buffer the Products table to hold it in memory while scanning, avoiding the need for multiple loads:
Table.SelectRows(Table.Buffer(Products), (dim) => dim[Product] = [Product])[PrepDays]{0}
Pete