I am a beginner in Power BI and DAX and need your help. I have 2 tables with relationship many-to-many:
Table "Assignment": ID_Assignment, Assignment_number (there are duplicates), Assignment_name, Personal_number.
Table "Budgets" ID_Budget, Assignment_number (there are duplicates, but maximum 2 equal values), Type (can be either "Infra" or "Staff"), Budget_in_dollars.
What I need to do is to trasfer the values from the column "ID_Budget" to the new custom column in the table "Assignment" with the following condition:
For each row in "Assignment" table: take the corresponding value of Budget_ID (if there is no duplicate value of Assignment number in "Budgets" table ). If there is a duplicate value of Assignment_number in the "Budgets" table:
- Take the value of Budget_ID that corresponds to "Infra" if the value of Personal_number = 0
- Take the value of Budget_ID that corresponds to "Staff" if the value of Personal_number <> 0
Thanks and regards, Vladimir
Aucun commentaire:
Enregistrer un commentaire