Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi -
I have a variable input box where a user types in the value and the value would update the adjusted column. The problem I have is that when you type in the value in the input box, it updates all values in the table. I would like to filter for specific data and only update the values selected from the variable box.
Example:
REGION | COUNTRY | Sum (SALES) | NPI Adj | % Adj |
180 | 40.00 | 1.5 | ||
AMERICANS | USA | 10 | 0.00 | 1.5 |
ASIA | CHINA | 50 | 0.00 | 1.5 |
EUROPE | GERMANY | 30 | 3.33 | 1.5 |
EUROPE | ITALY | 40 | 4.44 | 1.5 |
EUROPE | UK | 50 | 5.56 | 1.5 |
I only want to populate % Adj with 1.5 for Europe using input box but now it populates the complete column. I found someone wrote a macro do update only selected fields but didn't work.
Would you have any solution? I have attached my example.
Hi,
Instead of using a Variable, you can use InputFields.
You have to define a field during you load script as Input field. Then you can change it at the column level.
I have am using that as well but this will be thousands of rows of data and I cannot have the user input that many values. I want the user to select specific data and populate the column. so if user selects country as 'Europe' the value from the variable field will only populate column with that value for Europe. See my example attached above
Hi
See the Attachment.
Hope it will help you.
Regards
Aviral Nag
Hello Avril -
When I select Europe for example and type in 2 or 3, it still updates all other countries. What I want is if I select something in my select box, to just update that country or region and leave the rest as is.
I have been trying to figure it out but am not able to.
Thank you so much for all your help!!!
Hi Aviral -
Your solution worked as well as mine. But just to clarify, if I select one country, I just want to update the values for that country not others. Would you know how I can do that please?
Thanks
Hi petraraczynski,
I am new to QlikView, but I guess this can be resolved using one more variable. Let say 'vUpdateCountry' that stores the selected country value.
To store the value of selected country you can use a function
=GetFieldSelections([filedname],'',1).
Here mentioning 1 would just store one selected country in the variable if you want multiple selections then you can change it to 3 or 5 or whatever is your requirement. There are more functions available to perform the same tasks like 'concat' and 'maxstring'.
This will store the value in the variable vUpdateCountry, and I am assuming that you can use this variable in the update syntax as a condition to update the % Adj field only for the selected country.
Hope this answer would help you solve the issue.
Thanks & Regards
VinayG
Vinay -
I still can't see how that will resolve my issue. See my sample here. So if I select Germany, my Adjust Projected % should only update Germany. Not sure how that extra variable will resolve it.
Thanks
Vinay -
I can't get that to work and I will have about 10 different selections. How would you make that work?
Thanks
Hello -
I still can't get this to work. can you please let send me the sample if you can?
Thanks,