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: 
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

can you please provide the sample app ??? I did not tried with data

Anonymous
Not applicable
Author

The source and app

avinashelite

Hi,

After lot of customization I got the Solution please find the attachment for the same

Anonymous
Not applicable
Author

Hi,

thank you very much but does not work if you change the variable vFecha

avinashelite

sorry check this

Anonymous
Not applicable
Author

sorry but it doesnt work fine.

The solutions for two example should be:

Thank you

Anonymous
Not applicable
Author

Hi,

any suggestion about this?

Thank you very much

avinashelite

Hi,

Sorry i was bit busy

try this expression this should work

if(FLAG='A' ,sum({<FEC_MODIF={"=Aggr(nodistinct  max(FEC_MODIF),PK)"}>}IMP))

avinashelite

Hi

Did it solve your issue??

If so please mark it as helpful or correct and close this thread

Anonymous
Not applicable
Author

Hi,

it is not working ok. It does not select only the max(FEC_MODIF) where FEC_MODIF <= vFecha. It is selecting all the records aggregated by PK where FEC_MODIF <= vFecha

For example, if you choose vFecha=20150118 the expression select also the record:

when the max(FEC_MODIF) where FEC_MODIF <= vFecha (20150118) is this one (and just it):

Anyway, thank you very much for the help.