Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I am trying to write a calculation where I compare various data and then if true return a result. One of these fields comes from another table and when I use the Related function it returns an error saying that either the filed doesn't exist or there is no relationship bestween the tables (which there is).
Any guidance would be appreciated.
The calc is as follows:
Solved! Go to Solution.
Hello @MarcUrdang
Can you share the sample pbix file or snapshot of the model view?
Cheers!
Vivek
https://www.vivran.in/
Connect on LinkedIn
Hi @MarcUrdang ,
Kindly share your sample data and excepted result to me, You can just copy and paste your content here directly.
First, both tables should be related. Second I see two related. I think you have to use it only on one side. Side from where you are trying to get data.
There is detailed explanation on https://databear.com/dax-related-table-functions/
Hi Amit .. yes they are both related .. and the tables are many to many relationship .. so I guess then i cannot do this?
@MarcUrdang , need sample to test. I think in your formula, you used related on both sides. try using only on one side.
Some time I also do this
Get from Table 2 in table 1
New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])
Hi Vivek .. thx so much .. it is very close but not quite correct as now it brings back just one of the PO Numbers against every line nad not the actual PO number for that line .. can I mail you the workbook? You will then see what I mean. Or perhaps I can show you in Teams? I can set up a call?
thanks
Marc
Sorry Amit .. I put the wrong name in 😞
@ImkeF , @Greg_Deckler , Can you help.
These tables have many to many join on the job no. And one on the table has line no. In visual he wants to bring line no from another table.
Hello @MarcUrdang
Can you share the sample pbix file or snapshot of the model view?
Cheers!
Vivek
https://www.vivran.in/
Connect on LinkedIn
Hi Vivek .. thank you so much for your quick reply .. our company doesn't allow us to post but I am able to email the .pbix if you don't mind that? If you can supply an email address I will send immediately.
thanks
Marc
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |