Forum Discussion
Daily Sum
Hi Good day,
Can anyone help me on how can i achieved my desired output. I need the sum of Daily Plan regardless of location. The Total Plan/day is the sum of Plan Hrs per planDate.
DESIRED OUTPUT
Thank you
Hii AllanBerces
if you need it your way this can be doneTotal Plan/day =
VAR TotalPerDay =
CALCULATE(
SUM('YourTable'[Plan Hrs]),
ALLEXCEPT('YourTable', 'YourTable'[PlanDate])
)VAR FirstOccurrenceCheck =
RANKX(
FILTER('YourTable', 'YourTable'[PlanDate] = EARLIER('YourTable'[PlanDate])),
'YourTable'[Plan Hrs],
,
ASC,
DENSE
)RETURN
IF(FirstOccurrenceCheck = 1, TotalPerDay, BLANK())
But the main thing to do it to create measure as it is more appropriate
Total Plan/day =
CALCULATE(
SUM('YourTable'[Plan Hrs]),
ALLEXCEPT('YourTable', 'YourTable'[PlanDate])
)
Did I answer your question? Mark my post as a solution!
I'd appreciate the kuddos as well
8 Replies
- Khushidesai0109Skilled Sharer
Hii AllanBerces
if you need it your way this can be doneTotal Plan/day =
VAR TotalPerDay =
CALCULATE(
SUM('YourTable'[Plan Hrs]),
ALLEXCEPT('YourTable', 'YourTable'[PlanDate])
)VAR FirstOccurrenceCheck =
RANKX(
FILTER('YourTable', 'YourTable'[PlanDate] = EARLIER('YourTable'[PlanDate])),
'YourTable'[Plan Hrs],
,
ASC,
DENSE
)RETURN
IF(FirstOccurrenceCheck = 1, TotalPerDay, BLANK())
But the main thing to do it to create measure as it is more appropriate
Total Plan/day =
CALCULATE(
SUM('YourTable'[Plan Hrs]),
ALLEXCEPT('YourTable', 'YourTable'[PlanDate])
)
Did I answer your question? Mark my post as a solution!
I'd appreciate the kuddos as well- AllanBercesPost Prodigy
Hi Khushidesai0109 thank you very much for the reply, working good.
- ryan_mayuSuper User
you can try this
Column = CALCULATE(sum('Table (2)'[Plan Hrs]),ALLEXCEPT('Table (2)','Table (2)'[PlanDate]))or create a measureMeasure = CALCULATE(sum('Table (2)'[Plan Hrs]),ALLEXCEPT('Table (2)','Table (2)'[PlanDate]))- AllanBercesPost Prodigy
Hi ryan_mayu MattiaFratello thank you very much for the reply, is it possible the sum will appeared only once in each date, the same as my example for the calculated column.
Than you
- AllanBercesPost Prodigy
- MattiaFratelloSuper User
Hi AllanBerces, please use the following:
Total Plan Day =CALCULATE(SUM('Table (2)'[Plan Hrs]),ALLEXCEPT('Table (2)', 'Table (2)'[PlanDate]))