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
Anonymous
Not applicable

Power BI table doesn't sum up

Hi there,

 

I am quiet conserned about an issue i have in my report.

 

I am have built a model X where I want to calculate Budget YTD but unfortunately the table does not SUM UP correctly (Total). In other words, the total per row is correct but the total per column is not correct.

 

I am using SUMX funtion.

 

Budget total is correct but YTD notBudget total is correct but YTD not

I am trying to understand why because I have other columns (Values) in the same table like SalesAmount and Variance but the total for these is correct.

 

The formulas I am using to calculate Budget YTD:

 

Spoiler
Budget YTD = ([Revenue Target] / (([Contract Uren All]) - [Uren Vrij]) * [Beschibare Uren])
 
where:
 
Spoiler
 
Revenue Target =
CALCULATE(
SUMX('Resource Revenue Target','Resource Revenue Target'[Revenue Target]),
FILTER(
'Resource Revenue Target',
'Resource Revenue Target'[Year] = SELECTEDVALUE('Date'[Year Number])))

Spoiler
Contract Uren All =
CALCULATE(
[Contract Uren],
FILTER(
ALL( 'Date' ),
'Date'[Year Number] = YEAR(TODAY())))
Spoiler
Contract Uren =
CALCULATE (
SUMX (Resource, Resource[Contract Monday] ) * [Werkdagen],
'Date'[Day Number] = "1"
)
+ CALCULATE (
SUMX (Resource, Resource[Contract Tuesday] ) * [Werkdagen],
'Date'[Day Number] = "2"
)
+ CALCULATE (
SUMX (Resource, Resource[Contract Wednesday] ) * [Werkdagen],
'Date'[Day Number] = "3"
)
+ CALCULATE (
SUMX (Resource, Resource[Contract Thursday] ) * [Werkdagen],
'Date'[Day Number] = "4"
)
+ CALCULATE (
SUMX (Resource, Resource[Contract Friday] ) * [Werkdagen],
'Date'[Day Number] = "5"
)
Spoiler
Uren Vrij =
CALCULATE(
[Uren],
'Hour Transactions'[HourType] = 9
|| 'Hour Transactions'[HourType] = 10
)
Spoiler
Beschibare Uren =
[Contract Uren]
- CALCULATE ( [Uren], 'Hour Transactions'[HourType] = 9 || 'Hour Transactions'[HourType] = 10 )
For privacy reasons I can't publish the report.
 
Can anyone help me with this? 
 
Regards,
 
Hicham
 
2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

I don't know what the formula of Budget YTD means. You could try to use the function of TOTALYTD to calculate.

 

Sales YTD = TOTALYTD(SUM('financials'[ Sales]), 'Table'[Date].[Date])

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Xue

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

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
kranthi82
Helper I
Helper I

Hello @Anonymous ,

Have you checked the relationships between the tables? 

 

Try to make a dummy report if you can't publish yours so it's easier to help.

 

/Kranthi 

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.