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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Variance in matrix table

I have the matrix table below. Each of the rows are measures - I've done this by the 'Switch Values to Rows' toggle. I'd like to calculate the variance between Actuals and Forecast is this possible?

 

jkc08_0-1667212506607.png

My source data is as below. These only show the first few columns but essentially the remaining columns are just the other measures e.g. net sales, COGS

 

jkc08_1-1667212580068.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a table.

vyalanwumsft_0-1667284777532.png

then create a measure as follow:

vyalanwumsft_1-1667285560985.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could create a table.

vyalanwumsft_0-1667284777532.png

then create a measure as follow:

vyalanwumsft_1-1667285560985.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-yalanwu-msft thank you for this, this is very helpful.

 

EDIT: I've managed to make this work. Is it possible to change the name of the Total comumn to variance?

 

Thanks

Anonymous
Not applicable

@amitchandak thanks - I don't quite understand what needs to be included in the new table? I want to be able to show the variance for each P&L item in a matrix, is this possible?

 

amitchandak
Super User
Super User

@Anonymous , Create a new table with values Actual, forecast and variance , Join it with that column ,

 

then create a measure like

if(Max(Dim[Actual Vs Forecast]) = "variance", calculate(Sum(Table[Value]), Dim[Actual Vs Forecast]="Actual") - calculate(Sum(Table[Value]), Dim[Actual Vs Forecast]="Forecast") , Sum(Table[Value]) )

 

 

use Dim's column [Actual Vs Forecast] in the visual

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.