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
yuvanne_11
Frequent Visitor

Creating a new measure for subtraction

Hello,

I am trying to create a new measure: 

ABS Value = Actual - Total, this is the formula I used but it gives me an error saying that the table name cannot be recognized or not found.

I also changed the summarization category to 'sum'. I guess the syntax is wrong. If anyone could help me with this it would be great.

Thanks!

Capture.PNG

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Without seeing the data model, I am not sure whether I understood your question correctly, but please try the below measure.

 

New Measure: =
SUMX ( 'TableName', 'TableName'[Actual] - 'TableName'[Total] )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

5 REPLIES 5
yuvanne_11
Frequent Visitor

Hi,

It's working 

Thank you so much!

Jihwan_Kim
Super User
Super User

Hi,

Without seeing the data model, I am not sure whether I understood your question correctly, but please try the below measure.

 

New Measure: =
SUMX ( 'TableName', 'TableName'[Actual] - 'TableName'[Total] )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Also, I tried using subtraction, I used this formula 

Forecast Accuracy = SUMX(1- ('Forecast Pivot','Forecast Pivot'[ABS Value]/'Forecast Pivot'[Actual]))
But it gives me an error that 'Operator or expression '( )' is not supported in this context. May I know what the mistake I did in this?

Hi,

Thank you for your message.

I am not sure by only seeing the measure, but please try the below.

 

Forecast Accuracy =
SUMX (
'Forecast Pivot',
1 - ( 'Forecast Pivot'[ABS Value] / 'Forecast Pivot'[Actual] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank you for your help.

I did try using this formula but not getting any results. Attaching pic for reference. I am trying to predict sales for future using forecast accuracy.Capture 1.PNG

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.

Top Solution Authors