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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Srikantht
Helper II
Helper II

How to get absolute values on forecast and actual ?

Hi guys,

 

I have a scenarioa.  I have 2 tables Articles in one table & forecast , actual in another table (total 2 tables). I want to show the data by aricle level. 

Srikantht_0-1659042824643.png

 

I want output is 30 as like above yellow marked . 

 

I wrote the below measure but I got 80 is the ouput

 

=SUMX(VALUES(Article[Article]) ,CALCULATE(ABS(sum(Forecast)-sum(Actual))).

 

any one help me ? How do i write a measure to get the ouput is 30 ?

 

Thanks in advance. 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Srikantht 

 

Break up the measure into two measures. This will make it work. 

ABS = ABS(SUM(Forecasts[Forecast]) - SUM(Actuals[Actual]))


ABS Diff = SUMX(VALUES(Articles[Article]),[ABS])

vjingzhang_0-1659406097777.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Srikantht 

 

Break up the measure into two measures. This will make it work. 

ABS = ABS(SUM(Forecasts[Forecast]) - SUM(Actuals[Actual]))


ABS Diff = SUMX(VALUES(Articles[Article]),[ABS])

vjingzhang_0-1659406097777.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @

v-jingzhang
PREVIEW
 
 
Thank you for giving your solution. 
 
The below query worked 
=SUMX(VALUES(Article[Article]) ,CALCULATE(ABS(sum(Forecast)-sum(Actual))).
 
and your solution also works. 
 
once again thank you I really appriciate you.
IPREVIEW
 
 
 
 
 
Srikantht
Helper II
Helper II

Any one Help me to write a measure. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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