Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sayadutt
Creator
Creator

Load data from multiple qvds - but print only latest value in set expression

Hi,

I am creating a new qvd everyday and loading the same in my qvw file using wild character.

 

Now in the chart Set expression, I need the count of an item from the last qvd file only.

When I use count(id), it gives me the count from ALL qvds, but I am only interested in LAST (latest) count.

 

Can you please help me.

 

Thanks

Labels (1)
5 Replies
Vegar
MVP
MVP

Assuming you have a date Field (or other numeric field) that increases per source file, you can use this for your set analysis.

=Count({< DateField = {"=$(=max(DateField))"}>}id)

neelamsaroha157
Specialist II
Specialist II

What you can try is you can create a column that would differentiate you each qvd and use that field in your set analysis. For example Filename() as columnName your column and in your expression you can use {<ColumnName = {'value here'}>}.

sayadutt
Creator
Creator
Author

Hi Vegar,

Yes, I have a unique Date field. However when I use your expression below, I don't see any change.

It is still showing count of ALL, instead of latest.

Count({< EntryDate = {"=$(=max(EntryDate))"}>}id)

Vegar
MVP
MVP

Just to make sure. You are adjusting the expression to your date field name? (The EntryDate and id field)


If it still does not work, try this:


Count({< EntryDate = {'$(=maxstring(EntryDate))'}>}id)

 

sayadutt
Creator
Creator
Author

Hi Vegar,

I have a new field say TOTAL, where I need to show the COUNT(Ids) from the latest qvds.

I tried with maxstring as well, but no luck.

 

When I create a listbox for for EntryDate and select some dates from there, then the above table works.

 

I am looking for something which will automatically show the latest value and users don't have to click the latest date from Listbox.