Forum Discussion
24 hrs sum column
- 5 years ago
Hi Dunner2020 ,
Please use the following calculated column:
24 hrs Value = CALCULATE(SUM('Fact Table'[30 Mins Value]),FILTER('Fact Table','Fact Table'[EpochHH]<=EARLIER('Fact Table'[EpochHH])+47 &&'Fact Table'[EpochHH]>=EARLIER('Fact Table'[EpochHH])))If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi, Dunner2020
Please try the below.
VAR currentHH = 'Fact Table'[EpochHH]
RETURN
SUMX (
FILTER (
'Fact Table',
'Fact Table'[EpochHH] >= currentHH
&& 'Fact Table'[EpochHH] <= currentHH + 47
),
'Fact Table'[30 Mins Value]
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
- Dunner20205 years ago
Post Prodigy
Jihwan_Kim , thanks for your reply. However, the above-mentioned formula does not produce the desired result as shown in the picture:
The first value shown in 24hrs values column should have been the sum of first two values of 30 Mins values column.
- v-deddai1-msft5 years ago
Community Support
Hi Dunner2020 ,
Please use the following calculated column:
24 hrs Value = CALCULATE(SUM('Fact Table'[30 Mins Value]),FILTER('Fact Table','Fact Table'[EpochHH]<=EARLIER('Fact Table'[EpochHH])+47 &&'Fact Table'[EpochHH]>=EARLIER('Fact Table'[EpochHH])))If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
- Jihwan_Kim5 years ago
Super User
Hi, Dunner2020
I think you did not use mine. Sorry that I do not know why Calculate is in front of your formula.
Thank you.