Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

HELP. SET ANALYSIS

Hi,

I would need some help with a set analysis expression.

My source data is:

I have a variable named vFecha = 20150120

Would need an expression that calculates the sum of imp by DES_NEGOCIO (dimension in graph) for records that:

  1. FLAG = 'A'
  2. PK that have the max(FEC_MODIF) where FEC_MODIF<= vFecha

Selected records should be highlighted in yellow:

Thank you very much.

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

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


Hola,

necesitaría ayuda con una expresión de set analysis.


Mis datos de origen son:

Tengo una variable llamada vFecha = 20150120

Necesitaria una expresion que calculase la suma de imp por DES_NEGOCIO (dimension en el grafico) para los registros que:

  1. FLAG = 'A'
  2. PK con la max(FEC_MODIF) donde FEC_MODIF<= vFecha

Los registros seleccionados deberían ser los resaltados en amarillo:

Muchas gracias.

25 Replies
avinashelite

you wanted the count of DES_NEGOCIO on the basic of PK rite??

Anonymous
Not applicable
Author

Would need an expression that calculates the sum of imp by DES_NEGOCIO (dimension in graph) for records that:

  1. FLAG = 'A'
  2. PK that have the max(FEC_MODIF) where FEC_MODIF<= vFecha

Here you have txo examples and the solution of each one:

Anonymous
Not applicable
Author

would be possible to solve it using Firstsortedvalues function?

avinashelite

yes I think so, try with it  once

Anonymous
Not applicable
Author

Hi,

I have created a new field PK_FECMODIF (PK & '-' & FEC_MODIF AS PK_FECMODIF).

I am able to find which values of PK_FECMODIF are the correct qith this expresion:

FirstSortedValue({<FLAG={'A'},FEC_MODIF={'<=$(=vFecha)'}>}PK_FECMODIF, -FEC_MODIF)

But then, im not able to create a expresion to get the sum of IMP for this PK_FECMODIF. I've tried this:

sum( {<

    PK_FECMODIF={"=FirstSortedValue({<FLAG={'A'},FEC_MODIF={'<=$(=vFecha)'}>}PK_FECMODIF, -FEC_MODIF)"}

   >}   IMP)

But it doesnt work.

Can anybody help me?

Thank you.

Anonymous
Not applicable
Author

hI,

Can anybody help me?

Thank you.