Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
saivina2920
Creator
Creator

How to calculate blank value along with add new column date and user Input

How to calculate blank value along with add new column date and user Input

I already defined <10 days, 10 to 30 Days and >30 Days ==> This is working fine.

But now, i want to calculate blank cell of EMP_RELIEVE_DATE.

For Example, whereever the blank available in the column of EMP_RELIEVE_DATE

then we have to take another column value EMP_RESIGN_DATE + "User Input Field"

EMP_RESIGN_DATE             EMP_RELIEVE_DATE
03/08/2020                              03/08/2020
10/08/2020                                 -
10/08/2020                                 -
15/11/2020                                 -
29/11/2020                                 -
07/12/2020                                 -
08/12/2020                               08/12/2020
09/12/2020                               09/12/2020
10/08/2020                                   -
11/12/2020                                    -
12/12/2020                                   -
13/12/2020                                   -
28/12/2020                               28/12/2020
29/12/2020                                    -
30/12/2020                                     -


If EMP_RELIEVE_DATE is 03/08/2020 ==> It means the calulation already processed and display the count.

If found any blank available in the field of EMP_RELIEVE_DATE,

then "get the user input" value + add in EMP_RESIGN_DATE.
EX :

EMP_RESIGN_DATE EMP_RELIEVE_DATE
03/08/2020 03/08/2020
10/08/2020 - ==> User Input "10" + 10/08/2020 = 20/08/2020 (10 + 10 days)

Like that, all the blank cells have to calculate by the system.

Here, 20/08/2020 is the EMP_RELIEVE_DATE for blank cell. Like that we have to calculate EMP_RELIEVE_DATE blank cell and apply in the exist formula of <10 days, 20 to 30 Days and > 30 Days

NOTE : IF VALUES IS THERE IN EMP_RELIEVE_DATE, then the system should calculate the current one formula already defined in variables.

Labels (1)
13 Replies
saivina2920
Creator
Creator
Author

=dayname(ALT(EMP_RELIEVE_DATE, EMP_RESIGN_DATE+$(vUserInput)))

It returns a value showing the date and difference.

If i haven't used dayname then the date format will come as "44651","44781",......like that.

But, the above function may not be required if we find alternate way to solve.

Anil_Babu_Samineni

I can see that there is an condition issue in dimension so I was wonder why and what it is doing? Dayname() replace with Date() in case if you need more workaround.

But, Where you are trying my expression and which is not working?

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
saivina2920
Creator
Creator
Author

pls. check the latest attachment with this.

Attached Excel data shows the correct output for your reference.

Attached Qlikview file showing the error and count not coming properly.

As per Attached Excel sheet,

OUTPUT - 1 (Highlighted Green)  : When user will not be entered any input

OUTPUT - 2  (Highlighted Yellow) : User Enter Input. So, EMP_RELIEVE_DATE = corresponding blank       

                                                                       of EMP_RELIEVE_DATE ROW.

                                                                       It means, EMP_RESIGN_DATE (14/08/2020 + 10 = 24/08/2020         

                                                                            ==> EMP_RELIEVE_DATE...

                           Like that all the blank rows should calculate if User Enters Input.

 

saivina2920
Creator
Creator
Author

Can you give us the correct output to complete this task..?