Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FieldIndex problem

Hello everyone

im having an issue regarding the use of FieldIndex and FieldValue functions.

im using the next expression:

FieldValue('Field2', FieldIndex('Field1',(sum(Venta)/1000)/(sum(Presupuesto)/1000+sum(Ppto)/1000)))

if instead of  calculating the value to search i type it it works but i actually need to be calculated.

thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

your expresion should look:

FieldIndex('AlcanceReal', floor((sum(Venta)/1000)/(sum(Presupuesto)/1000+sum(Ppto)/1000),0.001))

when you use num(....,'0,001') you only change the display format  

View solution in original post

8 Replies
Not applicable
Author

i'm not sure your expression gives always an integer value  - try to use a floor function

or

calculate the value outside the chart in a variable

and past it like:

FieldValue('Field2', FieldIndex('Field1',$(vNumber))

Not applicable
Author

Thanks pari pari ive already try that and it works but it brings me the same value for al my table rows

sebastiandperei
Specialist
Specialist

Hola alfredo!

Estás seguro que Field1 tiene exactamente el valor que da la expresión?

Agregá otra expresión con (sum(Venta)/1000)/(sum(Presupuesto)/1000+sum(Ppto)/1000) y fijate si ese es el valor exacto que tiene el Field1.

Podés mandar una copia reducida?

Not applicable
Author

Que tal sebastian,  si ya he verificado los numeros e incluso les he dado el mismo formato con la funcion num

En un momento mas subo un ejemplo

Not applicable
Author

Here is an example im trying to get the  FieldIndex of the value in search in index column

Not applicable
Author

your expresion should look:

FieldIndex('AlcanceReal', floor((sum(Venta)/1000)/(sum(Presupuesto)/1000+sum(Ppto)/1000),0.001))

when you use num(....,'0,001') you only change the display format  

Not applicable
Author

Thanks Pari Pari but, with  floor it lowers me the result and i need the exact number with the 3 decimals

Not applicable
Author

sorry i wrote it erong now it works thanks a lot pari pari