Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I am new to Power BI and I am trying to create a column in a table with a customer name that is held in another table, but only where the environment is set to production
Example trying to populate the Customer Name in this DIM table. This table only has Unique values, the key is ID
From Data in this FACT table, but only where the environment is production, the column called CustomerDescr exists in the below table also, which is what I am trying to get in the above, this table has 500+ rows, and 300+ distinct values, the Key is IdentifiedInstallationID
I have relationships set up between the 2 tables (1 to Many)
Thanks in advance
Dave
Solved! Go to Solution.
Hi, @Parkyerbike
You might want to try the following DAX expression:
Customer Name =
CALCULATE (
MAX ( 'Table2'[CustomerDescr] ),
FILTER (
'Table2',
'Table'[Id] = 'Table2'[IdentifiedInstallationID]
&& 'Table2'[Enviroment] = "Production"
)
)
Below is the example data I used:
table1:
table2:
relationship:
The results of the calculation columns are shown below:
Hi, @Parkyerbike
You might want to try the following DAX expression:
Customer Name =
CALCULATE (
MAX ( 'Table2'[CustomerDescr] ),
FILTER (
'Table2',
'Table'[Id] = 'Table2'[IdentifiedInstallationID]
&& 'Table2'[Enviroment] = "Production"
)
)
Below is the example data I used:
table1:
table2:
relationship:
The results of the calculation columns are shown below:
User | Count |
---|---|
95 | |
86 | |
78 | |
72 | |
67 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |