Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pranubitla
Contributor II
Contributor II

How to set the default value

Dear Experts could you please shed some light on this please

 

setup the default value for a below PRODUCT field in script level.
example:

  I am loading list of 3 columns from spread sheet, I would like to setup a default name COUNTRY = 'USA' in my country column for Laptops only

I've all list of countries but want to set to COUNTRY = 'USA'  for  'Laptops'

 

PRODUCT COUNTRYAMOUNT
MobilesCHINA3045
LaptopsUK3456
DesktopsJAPAN1012
IPADsUSA9834
LaptopsFrance3462
LaptopsIndia

3423

1 Solution

Accepted Solutions
awhitfield
Partner - Champion
Partner - Champion

Use a calculated dimension for your country field in a chart e.g.

=if(PRODUCT = 'Laptops','USA', COUNTRY)

Andy

View solution in original post

5 Replies
awhitfield
Partner - Champion
Partner - Champion

HI Pranu,

can you expand a little on what you actually mean by 'default value'?

Andy

pranubitla
Contributor II
Contributor II
Author

I've a list box name called  'PRODUCT'  I got 3 types of products

when I select Laptops I should only get USA, even though I got  data like China, UK, Inida... all converted to USA, 

Original Data:

PRODUCT COUNTRYAMOUNT
MobilesCHINA3045
LaptopsUK3456
DesktopsJAPAN1012
IPADsUSA9834
LaptopsFrance3462
LaptopsIndia

3423

Front end result should look like below

PRODUCT COUNTRYAMOUNT
MobilesCHINA3045
LaptopsUSA3456
DesktopsJAPAN1012
IPADsUSA9834
LaptopsUSA3462 Hope
LaptopsUSA

3423

awhitfield
Partner - Champion
Partner - Champion

Use a calculated dimension for your country field in a chart e.g.

=if(PRODUCT = 'Laptops','USA', COUNTRY)

Andy

awhitfield
Partner - Champion
Partner - Champion

Glad to be able to help!

pranubitla
Contributor II
Contributor II
Author

Really appreciated your prompt reply.