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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
FrankW
New Member

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
FrankW
New Member

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 @FrankW 

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]
)

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 @FrankW 

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.