cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
farofiera
New Member

CALCULATE function output incorrect result

Hi all,

 

I have 2 tables:

  1. DepartmentGroup.
  2. FullListDate.
The relationship between them as below:
farofiera_0-1623914955096.png

 

I want to calulate the SUM of "TotalTime" of all rows using below formula:

Column = CALCULATE(SUM(DepartmentGroup[TotalTime]),USERELATIONSHIP(DepartmentGroup[ReportDate], FullListDate[FullListDate]))

But the result I have is the same value of that row:

farofiera_1-1623915118788.png

 

I've also tried to remove all the filter but the result still the same.

Column = CALCULATE(SUM(DepartmentGroup[TotalTime]))

1 ACCEPTED SOLUTION
Fowmy
Super User IV
Super User IV

@farofiera 

Do not use calculate, it will convert each row as filter. just do it this way:

Column = SUM(DepartmentGroup[TotalTime])

Did I answer your question? Mark my post as a solution! and hit thumbs up


Blog - Data Visualization

Website   YouTube    LinkedIn   PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User IV
Super User IV

@farofiera 

Do not use calculate, it will convert each row as filter. just do it this way:

Column = SUM(DepartmentGroup[TotalTime])

Did I answer your question? Mark my post as a solution! and hit thumbs up


Blog - Data Visualization

Website   YouTube    LinkedIn   PBI User Group

View solution in original post

Thanks alot Fowmy,

It was me who didn't understand how calculate works.

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors