Forum Discussion

ahhollan's avatar
ahhollan
Icon for Helper I rankHelper I
6 years ago
Solved

Add values in visual as column in new table

I have one visual that shows # of items per month based on a count.  I have a new table with another type of items/month. I need to add the values from the visual as data in a new column in the new table. Is this possible?

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

    I assume that the Months are not repeating in the First Table. If that is the case you can use the below DAX in the New Column of the Second Table.

     

    New_Column:= LOOKUPVALUE(Table1[Count_Value], Table1[Month], Table2[Month])

    Best Regards,
    Vignesh M

    If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue :)

    • ahhollan's avatar
      ahhollan
      Icon for Helper I rankHelper I

      I'm a newbie to power BI. How do I enter this in the new column? When I enter it I don't get any lookup values. Also, do I use the specific month in place of the word month in the formula?  DAX is a little different than what I'm used to. Thanks for the help.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

         

        On the left Pane Click on the Second Icon from the Top. This will open Table Modelling View. Once you have it, On the Top Ribbon navigate to Modelling-> New Column -> Enter this Formula.

         

        If you find it difficult, do share your PBIX file.

         

        Best Regards,
        Vignesh M

        If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue :)

  • v-diye-msft's avatar
    v-diye-msft
    Icon for Community Support rankCommunity Support

    Hi ahhollan 

     

    You can just manage the relationship between these 2 tables if they have common ItemID/Month:

    Then you can add the count column directly:

    Alternatively, you can use the RELATED function: https://docs.microsoft.com/zh-cn/dax/related-function-dax

    Here's post for your reference: https://community.powerbi.com/t5/Desktop/Lookupvalue-lt-searchvalue-gt-is-a-value-in-the-current-row/td-p/790977

     

    please kindly mark the answer as a solution if it helps. thanks a lot!