Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change values of column based on variable box selections?

Hi,

I have a straight table with static column NOCHANGE with value 32. My user wants to show this value based on selections. when user made selection of dates for one month. I,e if date variable box is as below

StartDate= 01/01/2016

EndDate= 31/01/2016

then NOCHANGE column should show value as 128.

if date variable box is as below for a week

StartDate= 01/01/2016

EndDate= 07/01/2016

then NOCHANGE column should show value as 32.

Please can anyone suggest is it possible?

Thanks.


16 Replies
Not applicable
Author

is this possible? please can anyone suggest me

sathishkumar_go
Partner - Specialist
Partner - Specialist

Hi,

Create a one variable called vNOCHANGE and assign this variable value based on the startdate and enddate selection

i.e

StartDate= 01/01/2016

EndDate= 31/01/2016 then vNOCHANGE = 128

StartDate= 01/01/2016

EndDate= 07/01/2016 then vNOCHANGE = 32

Pass this variable value in your pivot.

-Sathish

Not applicable
Author

Thanks. how to pass vNOCHANGE in pivot table expression?

sorry if it is silly question

sathishkumar_go
Partner - Specialist
Partner - Specialist

go to pivot table expression

=vNOCHANGE

-Sathish

Not applicable
Author

tried it. showing blank in column?

I am sure that something I am doing wrong

I have created variable vNOCHANGE. did reload qvw and add =vNOCHANGE in pivot table expression

am I missing anything?

sathishkumar_go
Partner - Specialist
Partner - Specialist

Please share your application with sample data.

-Sathish

Not applicable
Author

I am wondering that I need to add something in triggers?

Mark_Little
Luminary
Luminary

Hi,

How is the nochange figure defined?

as suggested a variable will be the way found but, depends how it is defined will depend on how you will need to add it to the expression.

i.e.

vVariable

or

$(vVariable)

Mark

harsh44_bhatia
Creator
Creator

Hi,

I think you dont need anything to do with triggers,

i guess something wrong while assigning the value to the variable. Could you share your expressions code, it will be helpfull