Forum Discussion
How get field from other table
Hello Everyone !
I try to get some data from other table, i try with related(), but the relation don't permet to do this.
have you an idea ?
Thank you for you help ! My brain melt 😞
11 Replies
- AnonymousNot applicable
Anonymous without knowing the primary keys of your tables it's difficult to provide an exact solution, but have you tried using LOOKUPVALUE()?
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax - AnonymousNot applicable
Anonymous yes i tried 😞 I got a order table, line order, link table between order and bill and bill table. So i don't get the same field on different table.
- AnonymousNot applicable
Sorry, but your data model isn't really making any sense to me at all.
I'd highly recommend structuring in a star schema if at all possible.- AnonymousNot applicable
I try to make a better scheme :
- AnonymousNot applicable
Up 🙂
- AnonymousNot applicable
Up 🙂
- v-yalanwu-msft
Community Support
Hi, Anonymous ;
I made a simple example to understand your logic.
This is based on your model, as shown in my picture, id Bill ="a", which should be "hi" or "hello".
If your dax is creating columns, “a” can only correspond to unique values, so logically it's not clear which value you want to return, so related is invalid.
Can you share a simple example and the result you want to export?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
Hello v-yalanwu-msft !
Thanks you for helping !
I got a currency value on the table bill, like "EURO" or "DOLLAR". But i got my price line on order lines. I need to make a column for :
IF(bill[currency] = 'EURO';orderlines[priceline]/bill[valuecurrency];orderlines[priceline])
- v-yalanwu-msft
Community Support
Hi, Anonymous ;
Can you post sample data as text and expected output?
Not enough information to go on;please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tablesBest Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.