From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-20-2013 11:40 AM
I am looking to figure out if there is a way to define the total number of rows in a channel and then add the total number of rows to another, / that by another length and then * by 100 ?
C1 = Data.Root.ChannelGroups(1).Channels("Call_Start_Month[Offered]").Properties("length").Value
C2 = Data.Root.ChannelGroups(1).Channels("Call_Start_Month[Handled]").Properties("length").Value
C3 = Data.Root.ChannelGroups(1).Channels("INW<.30_By_Month").Properties("length").Value
Call Calculate(Total answered = C3/(C1-C2)*100,null,null,"%")
Is there a way to do this ?
05-21-2013 04:19 PM
Hi J,
Where do you want the result(s) to go? It looks like you get one scalar results, in which case you don't need the Calculate() command, given the code you already posted. Replace the Calculate() command with this:
ResultPct = 100*C3/(C1-C2)
MsgBox ResultPct
Brad Turpin
DIAdem Product Support Engineer
National Instruments
05-22-2013 08:43 AM
What I am trying to do is calculate the % of calls answered compared to offered, under 30 seconds.(Month over month).
I want to graph(x) month and (y)% of calls answered under 30 sec
Here is what I am doing and playing with, I have added the attachements that I am working with.
05-23-2013 12:28 PM
Hi J,
That's a long script. When I ran it, it threw an error at about line 340 where you're calculating the call times from the string channel that you get from the Excel file. I edited your script at that spot to calculate the elapsed seconds with the TTR() command in the Channel Calculator, which runs way faster than a VBScript loop over all the channel values:
'Separates Time for Ques Dim CH_QT_MIN, CH_QT_TOT IF Data.Root.ChannelGroups(1).Channels.Exists("Queue_Time") Then SET CH_source = Data.Root.ChannelGroups(1).Channels("Queue_Time") Set CH_QT_TOT = Data.Root.ChannelGroups(1).Channels.Add("Queue_Time_Total_Calculated",DataTypeFloat64) L1 = CH_source.Properties("Number").Value L2 = CH_QT_TOT.Properties("Number").Value Call Calculate("Ch(L2) = TTR(Ch(L1))") End If
So now the script runs all the way through and creates the report. Now what?
Brad Turpin
DIAdem Product Support Engineer
National Instruments