Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Measure Filter not working as expected, How to involve current Value?

Hi there,

 as a newbie my situation looks quiet simple, but I am fully stuck. Tthere is a table with a userdefined column containing a duration:

IntervalPlus = [MyTime]+ #duration(0,0,60,0)

With this column I want to create a kind of predictive graph with a measure:

Measure = 
CALCULATE (
  SUM(ExData[MyValue]),
      FILTER('ExData', ExData[MyTime] <= ExData[IntervalPlus]),
      FILTER('ExData', ExData[MyTime] >= ExData[MyTime])
)
But it looks like the SUM(ExData[MyValue]) is taken overall data, not filtered.
What am I missing?
Thanks in advance
Frank
 
1 ACCEPTED SOLUTION

or directly like:

Column =
VAR _time = ExData[Time]
RETURN
SUMX(
    FILTER(
       ExData,
       ExData[Time]>=_time
   &&ExData[Time]<=_time+1/24/6
     ),
    ExData[Value]
)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Yes of yourse.
I have a table with two columns: Time and a value witch contains an amount of events per 5 minute interval.
For each 5 Minute Interval I want to create a new Datapoint containing the next 12 Rows in Sum, to get a real one hour SUM.
Example in Excel Screenshots for 3 instead of 12 Rows:

FrankW_0-1681285427644.png

My try was to create a new column IntervalPlus with Time plus one hour (in this example 10 Minutes) and wanted to filter values where time is lower then IntervalPlus



hi @Anonymous 

try like:

Column =
SUMX(
    FILTER(
       ExData,
       ExData[Time]>=EARLIER(ExData[Time])
   &&ExData[Time]<=[IntervalPlus]
     ),
    ExData[Value]
)

or directly like:

Column =
VAR _time = ExData[Time]
RETURN
SUMX(
    FILTER(
       ExData,
       ExData[Time]>=_time
   &&ExData[Time]<=_time+1/24/6
     ),
    ExData[Value]
)
Anonymous
Not applicable

Well, this works great, thank you very much. It is not easy for me to get into this, as it is more or less a side quest. Thanks a lot

FreemanZ
Super User
Super User

hi @Anonymous 

could you tell us more about your expectation the measure, like what do you mean by "predictive graph"?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.