Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
sayadutt
Creator
Creator

Storing historical data

Hi All,

I have few fields which I display in my qvw file. Now I need to store these field values everyday and use it later to plot a trending graph.

For example: I have a variable $(vPass) and $(vFail). Everyday these values will be updated. I don't want to loose the previous days values and want to plot a trending graph based on no. of days.

 

Can you please guide me how I can store the values and later use it to plot values.

I am using excel data as my input.

 

 

Thanks

 

5 Replies
Anil_Babu_Samineni

Can't you create variables like $(vPass_Constant) and $(vFail_Constant) and for dynamic like $(vPass) and $(vFail)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

After you have calculated the pass/fail values and populated vPass and vFail, append into a qvd file like  this:

History:
LOAD $(vPass) as Pass,
	$(vFail) as Fail,
	Now() as Timestamp
Autogenerate 1;

If Alt(QvdCreateTime('History.qvd'), 0) > 0 Then
	Concatenate(History)
	LOAD Pass, Fail, Timestamp
	FROM History.qvd (qvd);
	
End If

Store History into History.qvd (qvd);

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sayadutt
Creator
Creator
Author

Hi,

Above script is giving me below error.

 

Syntax error, missing/misplaced FROM:
History:
LOAD as Pass,
as Fail,
Now() as Timestamp
Autogenerate 1
History:
LOAD as Pass,
as Fail,
Now() as Timestamp
Autogenerate 1

jonathandienst
Partner - Champion III
Partner - Champion III

You need to populate the variables vPass and vFail before using this script fragment.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sayadutt
Creator
Creator
Author

Hello Jontydkpi,

Can you please give me a sample example. I am very new to qlikview.

Sample Data I have:

Month,  Item,  Status 

Jan, A, In Progress

Jan, B, Completed

Jan, C, Completed

Feb, D, In Progress

Feb, E, Completed

Feb,  F, In Progress

 

So now, for Jan, Pass = 2 (sum of Completed ones), Fail = 1 (sum of In Progress)

For Feb, Pass = 1 (only 1 Completed), Fail = 2

 

$(vPass) = Count({<QA Status = {'Completed'}>} Item)

$(vFail) = Count({<QA Status = {'In Progress'}>} Item)

These 2 variables are set using Settings->Variable Overview

 

Requirement:  

1) Need to create a qvd every night which will store  Month, $(vPass), $(vFail), Item, Date

2) later use this qvd to create a trend graph (monthwise) .

 

Can you  please help.