Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create table of difference between two tables from a source

I have several files combined using power query. The first table is the data for the base file while the second table is the data for the compared file. The 2 tables are obliged to several universal slicers (applied to both tables coherently). I wish to make a new table comprising two columns, unit difference and unit percentage difference.

 

Example output:

 

Here provided the example of pbix and files:

 

https://drive.google.com/drive/folders/1nYQ_Q3p7crChalNrWNdWb7sIdSqhBns9?usp=sharing

 

I would like to know how to do this. Appreciate any help given. Thank you.

  • Hi Anonymous ,

    According to your descriptin, here's my solution.

    In Power Query, select Cruzer Capacity Plan table, then click Merge Queries>Merge Queries as New.

    Merge tables with the date column.

    Then add two custom columns.

    unit difference=[Compared.Unit]-[Unit]
    percentage difference=[unit difference]/[Unit]

    Remove unwanted columns, get the new table.

     

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    what you ask for is doable.
    however, it would be useful to have tables in the format of the screen shot you showed in your post

  • Hi Anonymous ,

    According to your descriptin, here's my solution.

    In Power Query, select Cruzer Capacity Plan table, then click Merge Queries>Merge Queries as New.

    Merge tables with the date column.

    Then add two custom columns.

    unit difference=[Compared.Unit]-[Unit]
    percentage difference=[unit difference]/[Unit]

    Remove unwanted columns, get the new table.

     

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.