Forum Discussion

tomekm's avatar
tomekm
Icon for Helper III rankHelper III
4 years ago
Solved

Combining/appending 2 reports from the same table into 1

Hi,

I currently have 2 reports built (pointing to the same table) with 3 columns each (2 of them are the same column names; 1 column is different) that I would like to combine/union into 1 single report, based on the same “Period”, and provide the net value of the change (“Impact” column). Please see screenshot below. The second screenshot is the desired output report. How can I accomplish this?

 

 

 

Thanks.

  • tomekm's avatar
    tomekm
    4 years ago

    Yes. Please see below. I'm looking to combine the 6 columns into 3 common ones (with the last one being the "net Impact" column).

     

    Period (removals)RemovalsImpact (Removals)Period (adds)AddsImpact (Adds)
    Apr-2021Removal-5Apr-2021Add1
    May-2021Removal-8May-2021Add3
    Jun-2021Removal-9Jun-2021Add6
    Jul-2021Removal-3Jul-2021Add7
    Aug-2021Removal-1Aug-2021Add2
    Sep-2021Removal-5Sep-2021Add9

     

     

     

  • Hi tomekm 

     

    Create a new table with below code, then add all columns into a table visual.

    Table 2 = UNION(SELECTCOLUMNS('Table',"Period",'Table'[Period (removals)],"Removals",'Table'[Removals],"Impact",'Table'[Impact (Removals)]),SELECTCOLUMNS('Table',"Period",'Table'[Period (adds)],"Removals",'Table'[Adds],"Impact",'Table'[Impact (Adds)]))

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

3 Replies

    • tomekm's avatar
      tomekm
      Icon for Helper III rankHelper III

      Yes. Please see below. I'm looking to combine the 6 columns into 3 common ones (with the last one being the "net Impact" column).

       

      Period (removals)RemovalsImpact (Removals)Period (adds)AddsImpact (Adds)
      Apr-2021Removal-5Apr-2021Add1
      May-2021Removal-8May-2021Add3
      Jun-2021Removal-9Jun-2021Add6
      Jul-2021Removal-3Jul-2021Add7
      Aug-2021Removal-1Aug-2021Add2
      Sep-2021Removal-5Sep-2021Add9

       

       

       

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

    Hi tomekm 

     

    Create a new table with below code, then add all columns into a table visual.

    Table 2 = UNION(SELECTCOLUMNS('Table',"Period",'Table'[Period (removals)],"Removals",'Table'[Removals],"Impact",'Table'[Impact (Removals)]),SELECTCOLUMNS('Table',"Period",'Table'[Period (adds)],"Removals",'Table'[Adds],"Impact",'Table'[Impact (Adds)]))

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.