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

Refer to field number in chart expression

Hello

Instead of using a field name as a reference to make a calculation, Q1 in this example :

if (vCurrentQuarter='2',sum({<[Family_Efficy_Product]={'10'},[Year]={$(vReferenceYear)}>}Q1),


is there a way to use a reference to a table name calling a field number as we would do in access : [target].field(5)

Q1 is a field name of the Target table.

if not is there a way to replace the 1 value by a variable ?

I have tried

if (vCurrentQuarter='2',sum({<[Family_Efficy_Product]={'10'},[Year]={$(vReferenceYear)}>}Q&$(vCurrentQuarter-1))

with absolutely no result ! ...but good try !



thanks for your help

pat

1 Solution

Accepted Solutions
andrey_krylov
Specialist
Specialist

Hi Patrice. I think if you remove the ampersand it may work

if (vCurrentQuarter='2',sum({<[Family_Efficy_Product]={'10'},[Year]={$(vReferenceYear)}>} [Q$(vCurrentQuarter-1)])

View solution in original post

2 Replies
andrey_krylov
Specialist
Specialist

Hi Patrice. I think if you remove the ampersand it may work

if (vCurrentQuarter='2',sum({<[Family_Efficy_Product]={'10'},[Year]={$(vReferenceYear)}>} [Q$(vCurrentQuarter-1)])

patricesalem
Creator II
Creator II
Author

thanks Andrey