Forum Discussion
Problem to join 3 tables together
- Anonymous2 years ago
Hi Anonymous ,
Regarding your question, I recommend that you ensure that the data set consists of multiple dimension tables and one fact table. The data you provided contains two fact tables, which is not conducive to building a star model.
Model relationships in Power BI Desktop - Power BI | Microsoft Learn
Filter criteria cannot be passed from 'SalesTransactions' to 'Prices'
You can use the 'LOOKUPVALUE' function.
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
Use the following DAX expression to create a column.
SalesAmount = VAR _priceGroup = RELATED(CustomersPrices[PriceGroup]) VAR _price = LOOKUPVALUE('Prices'[Price], Prices[ItemID],'SalesTransactions'[ItemID],Prices[PriceGroup],_priceGroup) RETURN _price * [Qty]
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Regarding your question, I recommend that you ensure that the data set consists of multiple dimension tables and one fact table. The data you provided contains two fact tables, which is not conducive to building a star model.
Model relationships in Power BI Desktop - Power BI | Microsoft Learn
Filter criteria cannot be passed from 'SalesTransactions' to 'Prices'
You can use the 'LOOKUPVALUE' function.
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
Use the following DAX expression to create a column.
SalesAmount =
VAR _priceGroup =
RELATED(CustomersPrices[PriceGroup])
VAR _price =
LOOKUPVALUE('Prices'[Price],
Prices[ItemID],'SalesTransactions'[ItemID],Prices[PriceGroup],_priceGroup)
RETURN _price * [Qty]
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.