March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I have an issue where I'm trying to find the SUM energy between two times, a departing time and an arrival time. However, when I try to sum using a filter I get nothing. I know the data is there because I can manually find it in the table.
For Context:
Table 1 has every minute marked, along with how much energy was used in that minute
Table 2 has a departing time and arrival time that I'd like to calculate between
The calculation I have tried:
Solved! Go to Solution.
Hi @Anonymous ,
Looks like you are creating a calculated column, try like this:
EnergyUse =
CALCULATE (
SUM ( 'Table1'[Energy] ),
FILTER (
ALL ( Table1 ),
'Table1'[Time] >= MIN ( 'Table2'[dep] )
&& 'Table1'[Time] <= MIN ( 'Table2'[arr] )
)
)
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Looks like you are creating a calculated column, try like this:
EnergyUse =
CALCULATE (
SUM ( 'Table1'[Energy] ),
FILTER (
ALL ( Table1 ),
'Table1'[Time] >= MIN ( 'Table2'[dep] )
&& 'Table1'[Time] <= MIN ( 'Table2'[arr] )
)
)
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Time greater than or equal to departure
and
Time lesser than or equal to arrival
This doesnt make sense , shouldnt the filter be
Greater than or equal to is >= no?
So it's >= depart time and <= arrive time to get the times in between?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |