Forum Discussion
kadapavel
Helper II
8 years agoMax value of time window
Hi Can someone support, I would like to filter data so that use only max value over selected time window and save the value in to new table Example: Value Time 10% 00.00....
- 8 years ago
Here are the steps to get every 3rd Second and related Maximum Value for a 3 second period
First I added 2 calculated Columns to filter out every 3rd second
Second = SECOND ( Table1[SignalTimeStamp] )
3rd_Second = IF ( ( Table1[Second] / 3 ) - INT ( Table1[Second] / 3 ) = 0, "3rd Second", "Others" )Final step is to get the Maximum Value for the 3 seconds interval. I used following MEASURE to do this
Max_Value = CALCULATE ( MAX ( Table1[Value] ), TOPN ( 3, FILTER ( ALL ( Table1 ), Table1[SignalTimeStamp] <= SELECTEDVALUE ( Table1[SignalTimeStamp] ) ), Table1[SignalTimeStamp], DESC ) )
kadapavel
Helper II
8 years agoHi here is illustration of what I'm trying to reach
Zubair_Muhammad
Community Champion
8 years ago- Zubair_Muhammad8 years ago
Community Champion
Here are the steps to get every 3rd Second and related Maximum Value for a 3 second period
First I added 2 calculated Columns to filter out every 3rd second
Second = SECOND ( Table1[SignalTimeStamp] )
3rd_Second = IF ( ( Table1[Second] / 3 ) - INT ( Table1[Second] / 3 ) = 0, "3rd Second", "Others" )Final step is to get the Maximum Value for the 3 seconds interval. I used following MEASURE to do this
Max_Value = CALCULATE ( MAX ( Table1[Value] ), TOPN ( 3, FILTER ( ALL ( Table1 ), Table1[SignalTimeStamp] <= SELECTEDVALUE ( Table1[SignalTimeStamp] ) ), Table1[SignalTimeStamp], DESC ) )- kadapavel8 years ago
Helper II
Perfect solution!
Thank you