Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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

  • Anonymous's avatar
    Anonymous
    Not 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.

    • Anonymous's avatar
      Anonymous
      Not 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.

      • Anonymous's avatar
        Anonymous
        Not applicable

        I try to make a better scheme : 

         

         

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity 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.

    • Anonymous's avatar
      Anonymous
      Not 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's avatar
        v-yalanwu-msft
        Icon for Community Support rankCommunity 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/38490

         

        The 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 tables

         

        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.