Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sayadutt
Creator
Creator

Reloding from multiple QVDs, but print the value from latest qvd into 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.

I also have an EntryDate as a field value. So for each qvd this field is unique. If this helps in anyway.

Can you please help me.

 

Thanks

7 Replies
Nicole-Smith

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

sayadutt
Creator
Creator
Author

Hi Nicole,

Looks like it worked.

Can you please guide me how I can add the same filter on my existing condition?

If (IsNull(Only([Status  ])), 'In Progress', only([Status  ]))

 

I just need to filter the above one on max(EntryDate)

 

 

Thanks

 

Nicole-Smith

You should just be able to add the set analysis into your only() function:

If (IsNull(Only({<EntryDate={'$(=maxstring({1}EntryDate))'}>}[Status  ])), 'In Progress', only({<EntryDate={'$(=maxstring({1}EntryDate))'}>}[Status  ]))

sayadutt
Creator
Creator
Author

Hi Nicole,

The solution did not work.

It returned blank.

 

 

Nicole-Smith

I don't understand what you're trying to do with that expression.  Please explain and post a sample file.

sayadutt
Creator
Creator
Author

I have a table which stores Status values for each day.

Something like:

Date, Project, Status

8/11, A, Not Started

8/12, A, In Progress

8/13, A, Completed

8/11, B, Not Started

8/12, B, In Progress

8/13, C, Completed

 

status column should be based on :

Complete - once ALL the individual status for that project move to "complete".

In progress - when ANY of the  individual status for that project is still under to "in progress".

Not Started - when All status are Not started

I need to print the last day's status following the above criteria.

 

 

 

Nicole-Smith

I would find the last status using this expression:
FirstSortedValue(Status, -Date)

The negative in front of Dates make it sort DESC instead of ASC and then it picks the first value of Status.

I've also attached a sample file showing this working.