PowerBI - 拆分 Table(规范化)

PowerBI - Split Table (Normalization)

我想在 Power BI 中使用 DAX 表达式拆分以下 table:

Click here to see SCREENSHOT of Tables Schema - Before & After

我可以使用 "GroupBy" DAX 函数创建两个 tables "Customer" 和 "Car",但无法创建桥-table "CustomerCar".

这些身份证号码仅供参考。插入 User 和 Car 记录后,我们需要使用它们的 ID(自动递增 ID)...知道吗?

请帮忙

不确定这是否适合您。我没有使用groupby。使用您提供的数据样本创建三个独立的 table。

对于客户table

Customer = SELECTCOLUMNS('Source Table',"ID",'Source Table'[id]+100,"First Name",'Source Table'[first_name],"Last Name",'Source Table'[last_name])

汽车table

Car = SELECTCOLUMNS('Source Table',"ID",'Source Table'[id]+10000,"Car_Make",'Source Table'[Car_make],"Car_model",'Source Table'[car_model],"Car_Year",'Source Table'[car_vear],"Car_Price",'Source Table'[car_price])

客户用车table

CustomerCar = SELECTCOLUMNS('Source Table',"ID",'Source Table'[id], "Customer_ID",'Source Table'[id]+100, "Car_id",'Source Table'[id]+10000)