cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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.

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 ?

1 ACCEPTED SOLUTION
Community Support

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])``````

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

3 REPLIES 3
Community Support

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])``````

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

Helper II

Hi @

v-jingzhang
PREVIEW

Thank you for giving your solution.

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

once again thank you I really appriciate you.

Helper II

Any one Help me to write a measure.

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors