Forum Discussion

alexavenger's avatar
alexavenger
New Member
8 years ago
Solved

Group by ID in Visual Table

I've read a lot about these here but seems that the solution that I need is not here. 

 

I have one table with animals and the country of origin concatenated csv like this:

 

Animal 1 | Norway, China, Perú

Animal 2 | Spain, Argentina, United States

 

I need to link that with another table where there are regions.

 

Norway | North Europe

China | Asia

Spain | South Europe

 

Obviously, I can't link it with the CSV content. 

 

So, I created another table from the same source as the first one but in columns like this.

 

Animal 1 | Norway

Animal 1 | China

Animal 1 | Perú

Animal 2 | Spain

...

 

Then I linked the first table with this one (with the ID, not showed here). And also I linked this third table with the country region one. 

 

So, now I need to have a report where I can export the list of animals filtering it by region. 

I've created a report with a Table including data from the First table and adding Region filter.

 

1 - This way the filter is not working as there's no data from the table where the Region is linked.

 

Solution. I've added data from 2 table to the table, the table result is like this:

 

Animal 1 | Norway | Norway, China, Perú

Animal 1 | China | Norway, China, Perú

Animal 1 | Perú | Norway, China, Perú

Animal 2 |Spain | Spain, Argentina, United States

...

 

This way when I filter by region the table changes but I have duplicated Animals and I'm only interested in having Animal 1 and csv countries. 

 

I wonder if it's possible to group by column 1 (Animal1) like MySQL and have something like this:

 

Animal 1 | Norway | Norway, China, Perú

 

Animal 2 |Spain | Spain, Argentina, United States

 

It's not perfect but then I can hide the middle column and check only the other ones.

 

A long text here... sorry

 

Thank you for your help.

  • Hi alexavenger,

     

    It seems that you have three tables and create the relationships. To get the solution, I need to know the table you create.

     

    If it is convenient, could you share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

     

    Best Regards,

    Cherry

3 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi alexavenger,

     

    It seems that you have three tables and create the relationships. To get the solution, I need to know the table you create.

     

    If it is convenient, could you share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

     

    Best Regards,

    Cherry

    • alexavenger's avatar
      alexavenger
      New Member

      Yes you're right the problem is in the relationship. 

      It was single, now is fixed!

  • Anonymous's avatar
    Anonymous
    Not applicable

    WIth out column header , simply following the values is diffcult to follow in some places. If you put thses sample data in tablur format , will be easy to understand.

     

    Thanks

    Raj