Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

KPI based on Aggr() function

Hi all i have a problem: i have a KPI that run in this way

 

sum( total <column A>

          aggr(

                    if( etc etc etc, 1), column B, column C)

 

but the aggregation function, although I create a field that is the concatenation of my 2 fields "campoB" and "Campo C" through autonumberhash, decides to cut me off the results from the count !! I don't know what to do anymore ... if I remove the aggregation function the KPI does not work, if I put it wrong the calculation ... I can't add the 1 of my "if" without the aggr?

               

6 Replies
Highlighted

Re: KPI based on Aggr() function

Would you be able to share a sample to show the issue you are running into?

Highlighted

Re: KPI based on Aggr() function

Maybe you need to add columnA in aggr parameters?

As said by Sunny a sample will be nice to check.

Highlighted
Contributor
Contributor

Re: KPI based on Aggr() function

sum( total <[RST Codice]>
aggr(
if(

sum( total <A3GCounter, [Causale (categoria)]>
{<
Transaction_Day={">=$(=vA3GNumeroGiorni)"},[Causale (descrizione)]-={'INIZIATIVA 2%'},DESC_TP_SOTT_PAG_FEND-={'SUCCESSIONE','RITENUTA NON DOVUTA','RIM.NO FIRMA C.F.'},DESC_TP_PAG_FEND-={'RID','REINV.DIST.DIV.REALI'},FLG_IS_CF={0},AnnoMeseCifre=,DateStamp=,Transaction_OrderDate_Num={">=$(vA3G_DataRangeMin)<=$(vA3G_DataRangeMax)"}, [Causale (categoria)] = {'ACQ','VERS','SWIN','SWOUT','PREL','VEN'}
>}
fabs([Controvalore lordo transazione])) > vA3GSoglia

and

count( total<[RST Codice]>
{<
Transaction_Day={">=$(=vA3GNumeroGiorni)"},[Causale (descrizione)]-={'INIZIATIVA 2%'},DESC_TP_SOTT_PAG_FEND-={'SUCCESSIONE','RITENUTA NON DOVUTA','RIM.NO FIRMA C.F.'},DESC_TP_PAG_FEND-={'RID','REINV.DIST.DIV.REALI'},FLG_IS_CF={0},AnnoMeseCifre=,DateStamp=,Transaction_OrderDate_Num={">=$(vA3G_DataRangeMin)<=$(vA3G_DataRangeMax)"}, [Causale (categoria)] = {'ACQ','VERS','SWIN','SWOUT','PREL','VEN'}
>}
distinct (A3GCounter&[Causale (categoria)])) > vA3GNumeroTransazioni,

1
), A3GCounter, [Causale (categoria)]))



this is my problem
Highlighted

Re: KPI based on Aggr() function

I see an expression... but I still don't see the problem 🙂

Highlighted
Contributor
Contributor

Re: KPI based on Aggr() function

The count of the expression is wrong
Highlighted

Re: KPI based on Aggr() function

okay good... so you know what is not right... how do you want to help you? Just by looking at the expression, how can I tell you what to fix?