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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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