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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yuezhe-msft
Employee
Employee

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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...

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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