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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.