Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I am new at QV. Help with Data Table (Soy nuevo en QV. Ayuda con Tabla de Datos)

Hello,

I'm starting to use QV and have a problem that I can not solve. See if you can help me out. Thank You.

I created a table box with the following script:

PlanifRecursos:

LOAD * INLINE [

    usuarioid, AUX_Coste1, AUX_Coste2

    77, "26,44","5,25"

    92, "21,60","8,57"

    135, "24,56","9,75"

];

right join(PlanifRecursos)

SQL SELECT agno as PR_Año,

    PR_Ejercicio as exercise,

    "horas_ene" as PR_HorasEnero,

    usuarioid

FROM "v_planif_recurso"

WHERE (v_planif_recurso.ejercicio = 2015) AND (v_planif_recurso.agno = 2015);

This way I get the following result:

    

exerciseLambusuarioidhoras_eneAUX_Coste1AUX_Coste2
2015201577026,445,25
201520151351024,569,75
2015201592121,6

8,57

My problem is I need to include two new columns to the table box with the result of multiplying the value of the "horas_ene" with values ​​"Aux_Coste1" and Aux_Coste2 "fields, and not how.

The result that I would get something like this:

     

exerciseLambusuarioidhoras_eneAUX_Coste1AUX_Coste2Coste1xHorasEneCoste2xHorasEne
2015201577026,445,2500
201520151351024,569,75245,697,5
2015201592121,68,5721,68,57

Where:

Coste1xHorasEne = horas_ene * Aux_Coste1

Coste2xHorasEne = horas_ene * Aux_Coste2

I hope you can help me. Thanks in advance.

Translated with Google Translate - Qlik Community Administrative Team

Hola,

Estoy empezando a utilizar QV y tengo un problema que no sé como resolver. A ver si pueden echarme una mano. Gracias.

He creado un Cuadro de Tabla con el siguiente script:

PlanifRecursos:

LOAD * INLINE [

    usuarioid, AUX_Coste1, AUX_Coste2

    77, "26,44","5,25"

    92, "21,60","8,57"

    135, "24,56","9,75"

];

right join(PlanifRecursos)

SQL SELECT agno as PR_Año,

    ejercicio as PR_Ejercicio,

    "horas_ene" as PR_HorasEnero,

    usuarioid

FROM "v_planif_recurso"

WHERE (v_planif_recurso.ejercicio=2015) AND (v_planif_recurso.agno=2015);

De esta forma obtengo el siguiente resultado:

    

ejercicioagnousuarioidhoras_eneAUX_Coste1AUX_Coste2
2015201577026,445,25
201520151351024,569,75
2015201592121,6

8,57

Mi problema es que necesitaría incluir dos nuevas columnas al Cuadro de tabla, con el resultado de multiplicar el valor del campo "horas_ene" con los valores de los campos "Aux_Coste1" y Aux_Coste2", y no se como hacerlo.

El resultado que quisiera obtener es algo así:

     

ejercicioagnousuarioidhoras_eneAUX_Coste1AUX_Coste2Coste1xHorasEneCoste2xHorasEne
2015201577026,445,2500
201520151351024,569,75245,697,5
2015201592121,68,5721,68,57

Donde:

Coste1xHorasEne = horas_ene * Aux_Coste1

Coste2xHorasEne = horas_ene * Aux_Coste2

Espero que me puedan ayudar. Gracias por anticipado.

2 Replies
Gysbert_Wassenaar

The easy way out is to do those calculations in chart expression in a straight table. The alternative is to create a new table with a resident load from the result table that is created by the right join.

PlanifRecursosNew:

LOAD *,

    horas_ene * Aux_Coste1 as Coste1xHorasEne,

    horas_ene * Aux_Coste2 as Coste2xHorasEne

Resident PlanifRecursos;

Drop Table PlanifRecursos;'

Rename Table PlanifRecursosNew to PlanifRecursos;


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you very much for your reply, Gysbert.
It worked perfectly. It was what I needed !!
Regards.