Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi there,
I have a data set that looks like as shown in the picture:
In the data EpochHH is the unique number that represents the half-hour time slot of the given date. Now I want to create a new column that calculates the sum of [30 mins value] column in the next 24 hours. The 24-hour window should be floating. So I tried to create a formula that looks like as follow:
24 hrs Value =
Solved! Go to Solution.
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.
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.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@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.
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
I think you did not use mine. Sorry that I do not know why Calculate is in front of your formula.
Thank you.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Dunner2020 , Try a new column like
24 hrs Value =
CALCULATE(SUMX(FILTER('Fact Table','Fact Table'[EpochHH] >= earlier('Fact Table'[EpochHH]) && 'Fact Table'[EpochHH] <= earlier('Fact Table'[EpochHH])+ 47),'Fact Table'[30 Mins Value]))
@amitchandak , When I used earlier function it throws an error message that parameter is not correct type as shown in the following picture:
User | Count |
---|---|
112 | |
71 | |
57 | |
44 | |
39 |
User | Count |
---|---|
176 | |
125 | |
61 | |
60 | |
58 |