Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Create one summarized table from two tables.

I have tables like this:

Table 1

CustomAct QtyAct Rev
11223344323221
2233445524422223
111222333453214
223344554545454

Table 2

CustomPlan QtyPlan Rev
AABBCCDD24222324
111222333453214
11223344122229
223344554545454

 

I would like to summarize the two tables seperately. And then merge the two tables with Custom being the common column resulting in 5 columns.

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      custom = distinct(union(distinct(Table[Custom]),distinct(Table[Custom])))

      I am seeing one custom column. In the same dimension/table, I wish to see the ACT QTY, ACT  Volume, Plan QTY, Plan Volume.

  • Anonymous's avatar
    Anonymous
    Not applicable

    By adding 

    custom = distinct(union(distinct(Table[Custom]),distinct(Table[Custom])))

    I am seeing one custom column. In the same dimension/table, I wish to see the ACT QTY, ACT  Volume, Plan QTY, Plan Volume.

  • Hi,

    I believe that the ideal structure to have is where you have a single table.  Rename the second and third columns to Qty and Rev.  In both tables insert a column (titled as Nature) with Actual and Plan entries in that column.  In the Query Editor, append the two tables.