Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Create a new table from columns from an existing table with unique values

I'm trying to create a new table from an existing table called Samples. The Sample_Id is occuring multiple times in the table, but only a couple of times a value is connected to a sample ID. What I want is to create a table with all sample ID's occuring only once and the sample ID's with a value connected to them should show the value. See an example of the database below:

 

Sample_IdValue
13 
13 
13 
24 
240,76
24 
32 
32 
42 
420,45
42 

 

The result I want to get is:

 

Sample_IdValue
13 
240,76
32 
420,45

 

Can anyone please advise how I can do this? Thanks in advance for your help!

  • Anonymous 

     

    As a calculated table you can use

     

    Table = SUMMARIZE(Table1,Table1[Sample_Id],"Value",sum(Table1[Value]))

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    As a calculated table you can use

     

    Table = SUMMARIZE(Table1,Table1[Sample_Id],"Value",sum(Table1[Value]))