Skip to main content
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.

Helper I
Helper I

Subtracting one column of a matrix from another and display result


I have a matrix with two date columns and need to display the difference between the two. So the result would look like:



So I start by creating two measures: 


And then created 


I'm not able to add this as a column to the existing matrix, so I've tried things like creating second matrix or table and hiding the row and column names so it looks like one visual 


But no matter what type of visual or how I arrange variables, I can't get the visual to generate.


Any suggestions?








Super User
Super User


I think the issue is here:

delete the quotations ( " " ) keep only the number


View solution in original post

Community Support
Community Support

Hi, @bematth ;

Is your problem solved?  If so, kindly mark the proper reply as a solution to close the case. 

If not,

You could change it to:

Difference = [nf2020] - [nf2021]

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.

Hi @v-yalanwu-msft 

this issue has been solved already. Thank you

Super User
Super User


I think the issue is here:

delete the quotations ( " " ) keep only the number



The above reply ☝️

Aha! That did it!

I swear, 9/10 my error is usally the result of something like that!

Thank you!

Super User
Super User

Hi @bematth 
Difference = [nf2020] - [nf2021]

It is also worth mentioning that it is a good practice to have a date table filtering your fact table.

I get the same results when using Difference = [nf2020] - [nf2021].


Based on the data source, I'm not sure a date table would be a possibility. 


Usually you can create a date table locally and connect it to your fact table. However, what do you mean by same result? You receive an error? What does the error say? Are you sure nf2020 and nf2021 are measure?

I get the same "Cannot display visual... comparison operators do not support comparing values of type integer with vlalues of type text..." error.

nf2020 and nf2021 are measures with the data type being whole number, as is nfdiff.  (And using VALUE didn't work the first time)






Would you please return the two measure alone without the difference and share the results.

As in just pull them into the visual instead? I get the same error:




Please see my last reply with the proposed solution. 

I thought I just did? I posted a screen shot as well. 

Hi @bematth !


I believe the problem resides in your year column.

You try to filter a text value "2020" with a numeric column.

Either change the type of year column to text.

Or change your filter to 2020 instead of  "2020".


Could you try it out and let us know if it worked?


Hope it helped!


Kind regards,


Helpful resources

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

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

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