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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Kees
Helper I
Helper I

Simple calculation

Hi,

 

Here is the new bee again.

 

What seems a simple action (at least in EXCEL) is substracting (or multiplying / deviding / adding)) with values seems for me harder then I thought. When I search in the forum and google I see a lot of calcutations based on date fields and with needed filtering.

Situation:

2 tables: Forecated hours and Actual Hours, both with columns per month (apr, may, jun etc). with the number values.

Kees_0-1673366917071.png

Goal:

Substract Actual minus Forcast per month and presen in visual.

Think I need to create ( in think it needs to be a measure) to capture the outcome of Actual Oct - Forecast Hours.

 

I'm kind of stuck and perhaps overcomplicating a solution, is there a simple soluton?

 

Any suggestions?

 

Brgds Kees

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Kees ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours. The model relationships are shown below.

vtangjiemsft_0-1673401755829.png

(2) We can create measures. 

Actual - Forecated = MAX('Actual'[Actual Hours])-MAX('Forecated'[Forecated hours])
Actual Oct - Forecast Hours = CALCULATE('Actual'[Actual - Forecated],FILTER('Actual','Actual'[Month]="Oct"))

(3) Then the result is as follows.

Picture1.pngPicture2.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You should be using the "Unpivot Other Columns" feature in the Query Editor to flatten the table first.  To receive further help, share the two tables (in a format that can be pasted in an MS Excel workbook).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Kees ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours. The model relationships are shown below.

vtangjiemsft_0-1673401755829.png

(2) We can create measures. 

Actual - Forecated = MAX('Actual'[Actual Hours])-MAX('Forecated'[Forecated hours])
Actual Oct - Forecast Hours = CALCULATE('Actual'[Actual - Forecated],FILTER('Actual','Actual'[Month]="Oct"))

(3) Then the result is as follows.

Picture1.pngPicture2.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thanks! Slightly adjusted, but it brought me on the right track!

 

Brgds Kees

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors