Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

LISTED ELEMENTS SHOWING BLANKS AFTER MATCHING THEM

HELLO 

PLEASE AM FACING AN ISSUE WITH MY MATCHING VALUE ELEMENTS,

I'VE DONE THE MATCHING  FOR THE id names TO MATCH  the name  but am not getting the name of the  listed values am getting only the name of unique values

 

TABLE 1                                         

ID NAME | NAME                                    

  1             | A

   2            | B

   3            | C

  4             | D

 

 TABLE 2

PROJECT   | ID NAME                              

  1             | 2

   2            | 1,3,2

   3            | 3

  4             | 1,2,3,4

 

FINAL TABLE AFTER MATCHING

 

TABLE 3

PROJECT   | NAME                              

  1             | B

   2            | 

   3            | C

  4             | 

 

I'VE DONE THE RELATIONSHIP TO LINK THE 2 TABLES, AND IT WORKS PERFECLY BUT WHAT AM FACING IS THAT THE ONLY ELEMENTS SHOWING ARE THOSE WITH UNIQUE ID NAME  BUT THOSE WITH LISTED ID NAME ARE SHOWING BLANK CAN ANYONE HELP ME TO SORT IT? 

 

 

  • Hi Anonymous ,

    I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.

    Thank you.

8 Replies

  • Anonymous 

    To solve this, you need to split the comma-separated values into individual rows before creating the relationship. Here’s how you can do it:

     

    - Go to the Power Query Editor.
    - Select TABLE 2.
    - Select the column ID NAME.
    - Go to the Transform tab and select Split Column > By Delimiter.
    - Choose the comma (,) as the delimiter and select OK.
    - This will create new columns for each ID. Now, you need to unpivot these columns.
    - Select the columns that were created from the split.
    - Go to the Transform tab and select Unpivot Columns.
    - This will create rows for each ID.
    - Rename the columns appropriately.
    - Close and apply the changes.

     

    Now that you have individual rows for each ID, you can create a relationship between the ID column in TABLE 1 and the unpivoted ID column in TABLE 2.

     

    You can create a new calculated column or measure to concatenate the names for each project. Here’s an example of how you can do it using DAX:

    NewColumn =
    CALCULATE(
    CONCATENATEX(
    RELATEDTABLE(TABLE1),
    TABLE1[NAME],
    ", "
    ),
    ALLEXCEPT(TABLE2, TABLE2[PROJECT])
    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      please i made a mistake by saying that there is a prject column the is only one column named that is having the ID listed 

       TABLE 2

                   | ID NAME                              

                     | 2

                     | 1,3,2

                     | 3

                     | 1,2,3,4

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you bhanu_gautam for the prompt response.

    I’ve prepared a Power BI solution in Power Query that will fulfill your requirement.

    Please find the attached .pbix file for your reference.

    Go to Transform Data and check the Applied steps.

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

    Thank you.

    • Anonymous's avatar
      Anonymous
      Not applicable

      hello, 

      thank you for all please am not seeing the pbix file attached

       

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    Thank you for the response..!!

    Can you please refresh the page and check once as I was able to see it.

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

    Thank you.

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

    Thank you.

  • v-venuppu's avatar
    v-venuppu
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.

    Thank you.