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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Difference between 2 values in a Matrix Table

Hi, 

 

I am trying to create a matrix column (diff) that holds the values of what the difference is between two year columns. Example:

 

2015        2016            *Diff

________    _______        ______

10              6                -4

23             15               -8

187           195            +8

25             30              +5

 

What measures would I be using? I created these:

 

2015 = CALCULATE(COUNT('Phone Leads'[Calls]), Dates[year] = "2015")

2016 = CALCULATE(COUNT('Phone Leads'[Calls]), Dates[year] = "2016")

 

Diff in Years = [2016]-[2015]

 

But I'm getting this error message:

 

 Difference Error.png

 

Any advice?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

Your year column mist be formatted as number take out the quotation marks only put 2016 not "2016" should work.

Regards,
Mfelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Anonymous,

Your year column mist be formatted as number take out the quotation marks only put 2016 not "2016" should work.

Regards,
Mfelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks Mfelix !

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.