Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Can I have variable(s) that is: per sheet?

I want to set a variable linked to sheet. - is that possible?

example:

variable: vMyvar has value 'A' on sheet1, but value 'B' on sheet2

11 Replies

Re: Can I have variable(s) that is: per sheet?

Maybe in this way:

vMyvar:

= pick(match(subfield(getactivsheetid(), '\', 2), 'SH01', 'SH02'), 'A', 'B')

- Marcus

katharinakostka
New Contributor III

Re: Can I have variable(s) that is: per sheet?

Are you using QlikView or QlikSense?

In QlikView there is also the possibility to set actions which set the value of your variable on the event that the sheet is opened. So if you open a sheet the variable will be set to a certain value.

syukyo_zhu
Contributor III

Re: Can I have variable(s) that is: per sheet?

Hi Marcus,

Does your solution work in qlik sense?

I tried it, but i don't work?

Not applicable

Re: Can I have variable(s) that is: per sheet?

my Question was för Qlik Sense

this post is in the forum section: New to Qlik Sense...

Re: Can I have variable(s) that is: per sheet?

I haven't seen that the question was in a sense-area and it won't work in sense. I don't know if there another function then getactivesheetid() to read the active sheet. If not it should be possible with an extension.

- Marcus

shree909
Valued Contributor II

Re: Can I have variable(s) that is: per sheet?

I dont think you have an option to show and hide sheets in qliksense.

You can try the extesnions?

Thanks.

tjpetersen
New Contributor III

Re: Can I have variable(s) that is: per sheet?

You cannot show/hide sheets in Qlik Sense (out of the box) but check out branch.qlik.com for a solution

remyakrishnan
New Contributor

Re: Can I have variable(s) that is: per sheet?

I think this can help you out...

  • Reference to an individual cell: Sheet_name!Cell_address

        For example, to refer to cell A1 in Sheet2, you type Sheet2!A1.

  • Reference to a range of cells: Sheet_name!First_cell:Last_cell

        For example, to refer to cells A1:A10 in Sheet2, you type Sheet2!A1:A10.

Creating a reference to another sheet in Excel

When writing a formula that refers to cells in another worksheet, you can of course type that other sheet name followed by an exclamation point and a cell reference manually, but this would be a slow and error-prone way.

  • A better way is point to the cell(s) in another sheet that you want the formula to refer to,
  • Let Excel take care of the correct syntax of your sheet reference.

To have Excel insert a reference to another sheet in your formula, do the following:

  • Start typing a formula either in a destination cell or in the formula bar.
  • When it comes to adding a reference to another worksheet, switch to that sheet and select a cell or a range of cells you want to refer to. This can help you more for reference

https://goo.gl/Yig425

Not applicable

Re: Can I have variable(s) that is: per sheet?

getactivsheetid() is not a valid function in Sense.

Community Browser