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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem with aggr/sum/only function on set analysis

Hi,

I have this health laboratory scenario :

1) the user click on year/month to list box.

2) based on upon selection i must to display on table graph :

2a) the sum of total price analysis for month selected (the right formula is ( Sum(Aggr(FAbs(Sum(TOTALE)*TARIFFA), ANALISI_ANALISINAZIONALE))..this work ok..).

2b) the sum of total price analysis for previous month..in this case i try this formula :

sum(

Aggr( sum( FABS(sum({$<ANNO_accettazione={$(=Only(ANNO_accettazione)-1)}, MESE_accettazione={$(=Only(MESE_accettazione)-1)}>} TOTALE*TARIFFA)) ),

only ( {$<ANNO_accettazione={$(=Only(ANNO_accettazione))}, MESE_accettazione={$(=Only(MESE_accettazione))}>}ANALISI_ANALISINAZIONALE ),ANALISI_ANALISINAZIONALE) )


where field ANNO_accettazione is the Year and MESE_accettazione is he Month.

The dimension is ANALISI_ANALISINAZIONALE ( the analysis field)

But this formula not work.. nothing happened..

Any suggestion please?

thanks

Gigi

0 Replies