Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Is there a way to reference two expression of a table if they don't have a fixed name?

Hey guys, I just have a curiosity,

is there a way to reference two expressions of a single table, if they have a name that is not a tag ?

Here is my example :

error loading image

This is an example of a table with some expressions, they have a name that depends on variables.

My point is, if I have two expressions named "expression1" and "expression2". I can create a third expression called "expression3" and put

expression3 = expression1 / expression3

But If I want to do it with the formulas that I currently have, I cannot calculate something like that :

vDivision = max(all Año) -1 / max (all Año)

If I want to do this division, I have to divide directly the content.

Is there a way to avoid that? Maybe knowing the Id of the expression, or something like this.

Because I have a pretty complicated set analysis stuff, and If I could do it by tags, it would be a way easier.

Many thanks in advance!!!

1 Solution

Accepted Solutions
fernandotoledo
Partner - Specialist
Partner - Specialist

2 ways,

1) use variables as expressions, then refer to them as $(vEXPRESSION1) + $(vEXPRESSION2) ... This should be done in the document. The good part is that you can use the expression in various charts and if you need to change something, you do in one place!

2) in the chart use COLUMN(2) / COLUMN(1) ... the problem is that the order of columns may change the result, so you cant allow pivoting.

hope it helps,

Best regards,

FErnando

View solution in original post

2 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

2 ways,

1) use variables as expressions, then refer to them as $(vEXPRESSION1) + $(vEXPRESSION2) ... This should be done in the document. The good part is that you can use the expression in various charts and if you need to change something, you do in one place!

2) in the chart use COLUMN(2) / COLUMN(1) ... the problem is that the order of columns may change the result, so you cant allow pivoting.

hope it helps,

Best regards,

FErnando

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

It fits better for me the option of column().

It's easier to do :

( column(6) / column(5) ) -1

Than :

$(=max(all Año)) / $( =max(all Año) -1)

Anyways, you're right.

Many thanks Fernando.

See you around!!