Excel Graph for Time Duration to show continuity - excel

I would need to create a continuous line graph from Excel VBA to show the values even if the duration between two time pointers is large. e.g. in the given data, I had 8 users working in the system continuously from 2nd minute till 8th minute when all the users stopped working.
Here is the same data that I have -
Time Users
00:00 4
00:16 6
00:32 8
01:20 7
08:16 0
08:32 0
My expectation is to plot the graph like this :
however I am able to plot the graphs like the other one:
Can some one help how can I achieve the expected graph in excel? If you can provide any VBA code snippet as well, it will help.

Related

Dynamically change axes of a chart in power by using a slicer?

I have a dataset in power bi in which I have two variables: time of entry and time of exit. The columns have a structure like this:
Time of entry Time of exit
09:00 18:03
09:00 18:00
09:00 18:00
09:02 15:00
09:05 15.02
The case is that I want to make a graph that shows me on the x-axis the hours of departure and on the y-axis the count that has had this particular hour. And the same with the entry time. Although it is possible to use two graphs (one with each subject) I would like the graph to change the axes dynamically using a slicer.
I have consulted some pages on youtube, and I am looking for the simplest possible way to do it, but I can't get it to work. I have tried configuring a parameter and DAX code.
You can achieve your goal by using field parameters:
How to activate it:
Go to Modeling Tab --> New Parameter --> Fields
Then
Create a simple measure:
HourCount =
COUNT(Timescale[Time of entry])
Then Create a line chart, put the created field parameter on the x_axis:
Resulting Screenshot:

Delete rows if Second value is greater than Value

I have been collecting data over the past few data from an energy metering project i have set up.
The values that are recorded are saved in a CSV file and then extracted through usb drive.
i have opened and assessed the CSV file in excel and the data hasnt been recorded how i would like.
Instead of logging once every minute it has logged every 7 seconds.
This has created a problem as the template csv file i have created to average these figures wont work now.
i am trying to create a VBA marco to assess all the data and where the second value is higher then 6 seconds, i want it to delete it for example:
here is some of the values i am working with:
16:29:05 PAC3 239.8030701 50.01350021 1073.719116 4.450771332 0
16:29:05 PAC2 239.2398834 50.01499939 3046.500732 12.62684536 0
Above is how i would like it to look.
but it currently looks like below where there are several entries under the 16:30 time
16:30:02 PAC3 239.6912689 50.06306076 1092.592651 4.229027748 0
16:30:02 PAC2 238.8809052 50.06230927 3535.760254 14.82234478 0
16:30:09 PAC3 239.8191681 50.07057571 999.7850342 4.125905514 0
16:30:09 PAC2 239.2037506 50.06982422 2644.371338 11.05446911 0
because it is logging every 7 seconds i am getting about 7 - 8 logs per minute per PAC
so where the second value is greater than 6 seconds i would like the whole row to be removed. and continue to cycle through the entire column and remove them. These cells are formatted into a time format but do contain a time and data value
I have searched for ways to complete this task but have found no solutions
any help appreciated.
If you use =SECOND() function you can extract the seconds from the time value. Then loop up the column starting at the bottom and delete the rows that contain the values you don't want.

Advance Excel chart, scatter chart with multiple axis value with time lapse

I have 7 different measurement points on which is temperature measured for every hour (timestamp). Like these pic down.
I want graph similar like these.
Data table:
timestamp m1_temp m1_dist m2_dist m2_temp
Mar 9, 2017 12:00:00 AM 51.72 20.00 10.00 41.72
Mar 9, 2017 1:00:00 AM 48.73 20.00 10.00 38.73
Mar 9, 2017 2:00:00 AM 43.51 20.00 10.00 33.51
I get:
So problem is now:
I need to pick timestamp range (button or just calendar with time) and see animation (not real animation, it would look like that because data ranges would change for example every 2 seconds) on chart trough that time. It would be great to see chart title as timestamp.
Maybe connect points with line, it would be more visible to the viewer.
Thanks in advance
Currently, I don't think it's possible to have timelapse animation in Power BI visuals.
There is an idea related to this that you can vote on though:
Animation for ALL!
Without animation, there are a couple possible ways to attempt a similar thing. Either use a slicer for time or else show all times at once.
To do this, your data will need to be formatted a bit differently like this:

Issues Adjusting Time format in excel

I am using Excel and I am having issues with the order of my dates and times being arranged properly in a pivot chart.
The format is 6/1/2017 9:07:02 AM and so on for a log file.
When the pivot table is set up it will put 10am and 11am and 12am before 2pm and 9 am. since it goes in order it believes 1 in 10 and 1 in 11 and 1 in 12 comes before 2 and 9.
I need to adjust these times to say like 6/1/2017 09:07:02 AM with the leading zero to eliminate these issues. This is a massive log file so it cannot be done by hand. Suggestions?
Convert the text to a date/time index and plot that instead:
=DATEVALUE(LEFT(A1,10))+TIMEVALUE(MID(A1,12,8))+IF(RIGHT(A1,2)="PM",0.5,)

Excel - Evaluate multiple cells in a row and create report or display showing lowest to highest

In an Excel 2003 spreadsheet, I have the top row of cells calculating the number of days and hours I have worked on something based on data I put in the cells below for each category. For example I enter the time spent on Programming, Spoken languages, house, piano, guitar...etc. The top cell in each category will keep track of and display how many days and hours I spent as I add the time spent for each category each day. I want to evaluate this top row and then list in a "report" (like a pop up box or another tab or something) in order from least amount of time to the most amount of time. This is so I can see at a glance which category is falling behind and what I need to work on. Can this be done in Excel? VBA? Or do I have to write a program from scratch in C# or Java? Thanks!
VH
Unbelievable... I've been scolded for trying to understand an answer and requested to mark this question answered. I don't see anything to do this and could not find anything that tells you how, so I'm just writing it here. MY QUESTION WAS ANSWERED... But thanks anyway...
Consider the following screenshot:
The chart data is built with formulas in columns H3:I3 and below. The formulas are
H3 =INDEX($B$3:$F$3,MATCH(SMALL($B$2:$F$2,ROW(A1)),$B$2:$F$2,0))
I3 =INDEX($B$2:$F$2,MATCH(SMALL($B$2:$F$2,ROW(A1)),$B$2:$F$2,0))
Copy down and build a horizontal bar chart from the data. If you want to change the order of the source data, use LARGE() instead of SMALL().
Alternative Approach
Instead of recording your data in a matrix, consider recording in a flat table with columns for date, category and time spent. That data can then easily be evaluated in many possible ways without using any formulas at all. The screenshot below shows a pivot table and chart where the data is sorted by time spent.
Edit after inspecting file:
Swap rows 2 and 3. Then you can choose one of the approaches outlined above.
Consider entering the study time as time values. It is not immediately clear if your entry 2.23 means 2 hrs and 23 minutes, or 2 hrs plus 0.23 of an hour, which totals to 2hrs, 13 minutes.
If you are using the first method, then all your sums involving decimals are off. For example, the total for column B is 7.73 as you sum it. Is that meant to be 7 hrs and 73 minutes? That would really be 8 hrs and 13 minutes, no? Or is it meant to be 7 hrs and 43 minutes? You can see how this is confusing. Use the colon to separate hrs and minutes and - hey - you can see human readable time values and don't have to convert minute values into decimals.

Resources