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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Frost
Frequent Visitor

Count moving data

I have a dataset that looks like this:

 

datetimeNumber1Number2Number3Number4Number5Number6
09:12:5646     
09:18:370     
09:20:4718385    
11:00:03171846114401 
11:00:1418114000 
11:15:41000000
11:15:421171846113114
11:15:4717181131140 
11:15:491811400  
11:15:5000    

 

The dataset captures different states in a set of parameters to reflect what values are active at a given time, but at the same time moves and sorts the data in numerical order, until the parameter is cleared as '0'. As an example, at 09:20:47 value 18 and 385 is captured in "Number1" and "Number2" and stays active until 11:00:03. At this time, we capture 17, 46, 114 and 401 which are sorted in numerical order with 17 as the lowest in "Number1". Note that 18 is moved to "Number2" and 385 has been cleared and dissapears, since it's not active any more.

 

Now, I want to analyze this and do two things:

 

  1. Count number of times each value has been active during a time frame. In example, 17 and 18 are active twice, 1 and 113 once.
  2. Count the duration each value has been active. In example, 18 has been active from 09:20:47 to 11:15:41 first time and 11:15:42 to 11:15:50 the second time

 

Any chance of accomplishing this in Power BI?

 

3 REPLIES 3
Anonymous
Not applicable

@Frost,

I am not clear about that how you calculate the number of activity for each value. In your first example, do you mean that from 09:12:56  to 11:15:50, 17 and 18 active twice?

Regards,
Lydia

18 starts to be active at 09:20:47. At 11:00:03 it moves to "Number2" column, since we get a lower number in "Column1". 18 is still active. 11:00:14 it moves back to "Number1" since 17 has been cleared and dissapeared. 11:15:41 18 is cleared with '0'. 18 ahs therefore been active once during 09:20:47 to 11:15:41.

 

The second time 18 gets active again is at 11:15:42 in "Number3". Since lower numbers are cleared each step, it moves to "Number1" eventually at 11:15:49 and finally cleared at 11:15:50.

 

So, during 09:20:47 to 11:15:50, 18 has been active twice, but have been moving around in different columns due to lower values getting active until finally cleared.

 

Hope this helps...

Anonymous
Not applicable

@Frost,

I don't think that we can count the occurence for these values in Power BI Desktop, as the rules to calculate the number are dynamic and different for different values.

Regards,
Lydia

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors