Forum Discussion

Omelei's avatar
Omelei
Frequent Visitor
3 years ago
Solved

Get data from table

Hi guys,    Hope you can help me out.    I have 2 tables   Productconfig     Opportunity     Connection     Now, I'd like to add an additional column in Productconf...
  • Samarth_18's avatar
    3 years ago

    HI Omelei ,

     

    You can create a column as below:-

     

    Column =
    LOOKUPVALUE (
        Opportunity[prev opp id],
        Opportunity[Opp id], OpportunityConfig[opportunity id]
    )

     

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Omelei ,

    Please try to create a new column with below dax formula:

     

    Column =
    VAR cur_oid = [Opportunity ID]
    VAR o_id =
        CALCULATE (
            MAX ( Opportunity[Previous Opportunity ID] ),
            Opportunity[Opportunity ID] = cur_oid
        )
    VAR cur_pid = [Product ID]
    VAR _val =
        CALCULATE (
            MAX ( Productconfig[Quantity] ),
            FILTER (
                ALL ( Productconfig ),
                [Product ID] = cur_pid
                    && [Opportunity ID] = o_id
            )
        )
    RETURN
        _val
    

     

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.