Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Previous () wrong values

Hi Folks,

i got a situation and my table does look like:

Project, Document, Status, NewStatus

A, 12, closed,  open

A, 13, open, open

B, 15, closed, closed

B, 15, closed, closed

 

i am trying to create the new Field: NewStatus by using the below coding

if(Project = previous(Project) and Document <> previous (Document) and Status = 'closed', 'open', Status)

as NewStatus,

but i didn't achieve the expected output.

 

Does anybody have any idea how to resolve this issue? Thanks a lot for any feedbacks and help in advance.

Bek

 

Labels (1)
4 Replies
JustinDallas
Specialist II
Specialist II

What's your expected output?

beck_bakytbek
Master
Master
Author

Hi Justin, thanks a lot for your reply and time, i am trying to build the new field with the help of above coding:

if(Project = previous(Project) and Document <> previous (Document) and Status = 'closed', 'open', Status) as NewStatus

 

please let me know if you need more information

JustinDallas
Specialist II
Specialist II

Can you show me a table of your beginning data, and a table of your desired data and maybe what it's giving you that you don't want.

beck_bakytbek
Master
Master
Author

Hi Justin thanks a lot again for your reply, this is my table:

Project, Document, Status, NewStatus

A, 12, closed,  open

A, 13, open, open

B, 15, closed, closed

B, 15, closed, closed

 

with the help of fields: Project, Documents and Status i am trying to build the new field: NewStatus, the coding you have seen above :

if(Project = previous(Project) and Document <> previous (Document) and Status = 'closed', 'open', Status) as NewStatus