Skip to main content
cancel
Showing results for
Search instead for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## Find differences of total of two table.

I'm a newbie in Power Bi.

I have 2 price tables in Excel.

I want the price difference of these tables in Powerbi.

Please help me to do this.

 Table 2021 Item Code USD EUR CAD JPY 87290356 18 23.22 15.75 3 87290364 11 14.19 9.625 2 12548965 8 10.32 7 1 12548973 48 61.92 42 7 88461289 56 72.24 49 8 88461297 4 5.16 3.5 9 88461305 85 109.65 74.375 12 Total 230.00 296.70 201.25 41.19

 Table 2020 Item Code USD EUR CAD JPY 87290356 16.1 20.8 14.1 2.3 87290364 9.9 12.7 8.6 1.4 12548965 7.2 9.3 6.3 1.0 12548973 43.1 55.5 37.7 6.2 88461289 50.2 64.8 44.0 7.2 88461297 3.6 4.6 3.1 7.9 88461305 76.2 98.4 66.7 10.9 Total 206.31 266.14 180.52 36.95

 Result (Total Difference) USD 23.7 EUR 30.6 CAD 20.7 JPY 4.2
1 ACCEPTED SOLUTION
Super User

Hi, @siroopm2020

Please check the below picture and the sample pbix file's link down below.

I suggest having table structures like below.

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Go to My LinkedIn Page

5 REPLIES 5
Helper I

Thank You. Both replies are useful. Problem solved.

Super User

Hi, @siroopm2020

Please check the below picture and the sample pbix file's link down below.

I suggest having table structures like below.

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Go to My LinkedIn Page

Helper I

kindly explain to me how did you create a table structure like this from the given data

Super User

Hi, @siroopm2020

Thank you for your feedback.

I did the transform of each table in Power Query Editor.

You can select the Item Code Column, and unpivot others.

Thank you.

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Go to My LinkedIn Page

Super User

@siroopm2020 , one way is have measure like

USD diff = sum(Table2021[USD])  -sum(Table2020[USD])

EUR diff = sum(Table2021[EUR])  -sum(Table2020[EUR])

Then you can use show on row in matrix visual and use only values (put thisnew measure in values)

Or

Unpivot two Table - https://radacad.com/pivot-and-unpivot-with-power-bi

Create Currency bridge table

then create a measure and analyze by currency

sum(Table2021[Value])  -sum(Table2020[Value])

## Helpful resources

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors