Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
My query is pretty straight forward, I have the following table as input and would like to add a colum in the script while loading data in Qlikview.
(Picture of data below) Please note that the input data cannot be changed at the source.
INPUT DATA:
My goal is to add a column in the script that will rewrite the same description IF the Count =0 for every unique ID.
The data should look like this:
The nulls in New_Column can be replaced by something else like a number as long as it's different from the Description value.
Thank you.
Add the following column
if(count=0,Description) as New_column
Hi Arpitkharkia
Thanks for the reply. Apologies I forgot to mention a critical detail. Some of the data looks like the following:
Your approach will make it look like this:
Instead of the desired result, which is this:
If there is a method to replace all the "Count" that have 0 with the first "Description" that has a count=0, that would solve the issue.
Many thanks
im not sure how all of the data looks like and how new data will look in the future, but what i can think of now is to create a mapping file with three columns, description, count and new column.
You manually add the details of the new column accordingly and left join it to the main table.
I hope this makes sense Emma, else please let us know.
Regards,
Arpit