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: 
Anonymous
Not applicable

Query about a source for an indicator with multiple if

Good afternoon fellow Qlik, I have a problem in an indicator.
I am a beginner in the design of indicators by Qlik, I know a lot about SQL and much more about Excel and VBA.
In the Excel I have been able to solve the problem, but in the Qlik I can not get all the variables to be taken so that the graph goes as it should.
My biggest problem is the large number of conditioning variables that have to take into account the formula to make the graph.
Maybe there is a simpler way to write the formula and make it work, my only "weapon" is the conditional "if".
I ask you for help in this formula:


=IF(MonExpr='Dolares',if(Rem_Fac='Remitir',if(MONEDA='PESOS',(SUM(TOT_PEND_RTO_P)/vPesos)/UniMedi,SUM(TOT_PEND_RTO_P)/UniMedi),if(MONEDA='PESOS',(SUM(TOT_PEND_FAC_P)/vPesos)/UniMedi,SUM(TOT_PEND_FAC_P)/UniMedi)),

if(Rem_Fac='Remitir',if(MONEDA='PESOS',(SUM(TOT_PEND_RTO_P))/UniMedi,(SUM(TOT_PEND_RTO_P)*vPesos)/UniMedi),if(MONEDA='PESOS',(SUM(TOT_PEND_FAC_P))/UniMedi,(SUM(TOT_PEND_FAC_P)*vPesos)/UniMedi)))


I enclose an excel with the sample and the Qlick indicator.
From already thank you very much!!.

Note: translated with Goolge Translator

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Buenas tardes compañeros de Qlik, tengo un problema en un indicador.

Soy un principiante en el diseño de indicadores por Qlik, conozco bastante de SQL y mucho mas de Excel y VBA.

En el Excel lo he podido resolver el problema, pero en el Qlik no logro que todas las variables sean tomadas para que el grafico salga como debe.

Mi mayor problema son la gran cantidad de variables condicionantes que tiene que tener en cuenta la formula para poder realizar el grafico.

Quizas hay una forma mas sencilla de escribir la formula y de hacer que esta funcione, mi unica "arma" es el condicional "if".

Les pido ayuda en esta formula:

=IF(MonExpr='Dolares',if(Rem_Fac='Remitir',if(MONEDA='PESOS',(SUM(TOT_PEND_RTO_P)/vPesos)/UniMedi,SUM(TOT_PEND_RTO_P)/UniMedi),if(MONEDA='PESOS',(SUM(TOT_PEND_FAC_P)/vPesos)/UniMedi,SUM(TOT_PEND_FAC_P)/UniMedi)),

if(Rem_Fac='Remitir',if(MONEDA='PESOS',(SUM(TOT_PEND_RTO_P))/UniMedi,(SUM(TOT_PEND_RTO_P)*vPesos)/UniMedi),if(MONEDA='PESOS',(SUM(TOT_PEND_FAC_P))/UniMedi,(SUM(TOT_PEND_FAC_P)*vPesos)/UniMedi)))

Adjunto un excel con la muestra y el indicador Qlick.

Desde ya muchas gracias!!.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I paste the solution to the problem in case some other user serves.


=(if(Rem_Fac='Remitir'

,if(MonExpr='Dolares'

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_RTO_P)/vPesos+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_RTO_P)

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_RTO_P)+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_RTO_P*vPesos))

,if(MonExpr='Dolares'

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_FAC_P)/vPesos+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_FAC_P)

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_FAC_P)+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_FAC_P*vPesos))))/UniMedi

View solution in original post

1 Reply
Anonymous
Not applicable
Author

I paste the solution to the problem in case some other user serves.


=(if(Rem_Fac='Remitir'

,if(MonExpr='Dolares'

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_RTO_P)/vPesos+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_RTO_P)

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_RTO_P)+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_RTO_P*vPesos))

,if(MonExpr='Dolares'

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_FAC_P)/vPesos+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_FAC_P)

,SUM({<[MONEDA]={PESOS}>}TOT_PEND_FAC_P)+SUM({<[MONEDA]={DOLARES}>}TOT_PEND_FAC_P*vPesos))))/UniMedi