Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple expressions in terms of the dimension

Hi all!!

I am trying to create an expression depending on the value of the dimension. If the dimension is not 'SFA', the expression is the sum of the values of the dimension, but if it's 'SFA', the expression is the result of dividing two other expressions of other dimensions. Something like this:

=pick( match(KPI_M2, 'AKO', 'RPK','SFA','PSN','PSR','JTP')

,Sum({$<KPI_M2={$(='AKO')},TIPO={$(='REAL')}>} VALOR_OS)/1000

,Sum({$<KPI_M2={$(='RPK')},TIPO={$(='REAL')}>} VALOR_OS)/1000

,(Sum({$<KPI_M2={$(='RPK')},TIPO={$(='REAL')}>} VALOR_OS)/Sum({$<KPI_M2={$(='AKO')},TIPO={$(='REAL')}>} VALOR_OS))*100

,Sum({$<KPI_M2={$(='PSN')},TIPO={$(='REAL')}>} VALOR_OS)/1000

,Sum({$<KPI_M2={$(='PSR')},TIPO={$(='REAL')}>} VALOR_OS)

,Sum({$<KPI_M2={$(='JTP')},TIPO={$(='REAL')}>} VALOR_OS)

)

Thank you for your help!!.

Regards!

0 Replies