Calculating variances and divisions

andresf

New Member
Joined
May 13, 2012
Messages
22
Hi, can someone please help with this?

I have this raw data set

PRODUCTSALES ($)QUANTITY (KG)DATEYEARQUARTERNET PROFIT
Paper2020q2
Metalq1
Paper
2020q2
Metal2021q1
Paper2021q2
Metal2021q2






In Power BI, how can I get a matrix/table visualization like this:

|2021202120202020VARIANCEPROFIT MARGIN
PRODUCTSALESNET PROFITSALESNET PROFITSALESNET PROFIT20212020
Paper=net profit (paper 2021)/sales (paper 2021)
Metal



Thanks!

Andres
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
How about a simple Excel table and some formulas?

Book2
ABCDE
12020202020212021
2ProductSalesNet ProfitSalesNet Profit
3Paper666600602550
4Metal22120017871600
Sheet5
Cell Formulas
RangeFormula
A3:A4A3=UNIQUE(Table1[PRODUCT])
B3:B4,D3:D4B3=SUMIFS(Table1[SALES ($)],Table1[PRODUCT],Sheet5!$A3,Table1[YEAR],Sheet5!B$1)
C3:C4,E3:E4C3=SUMIFS(Table1[NET PROFIT],Table1[PRODUCT],Sheet5!$A3,Table1[YEAR],Sheet5!C$1)
Dynamic array formulas.
 
Upvote 0
I turned your data into a table called Table1. The Unique formula in Cell A3 spills out into as many rows as the table has.
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,469
Latest member
Kingwi11y

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top