Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Contributor II

Aggr with previous months

Hello !

I need to insert a set analysis showing last 3 months, but i use aggr function in it.



DISTINCT Aggr(if(((Sum(QtdeOcorFSP) + Sum(QtdeOcorOESP)) = 0),nCdDistribuidor_RabRoteiro),nCdDistribuidor_RabRoteiro, MesAno_RABRoteiro))

So what i want is :

if the sum of QtdeOcorFSP and QtdeOcorOESP is 0, then, i count nCdDistribuidor_RabRoteiro, using aggr MesAno_RABRoteiro and nCdDistribuidor_RabRoteiro as Dimensions.

I've inserted set analysis before "distinct", but if i select the month, dont bring me last 3 months, because i'm grouping by my dimension MesAno_RABRoteiro .

But i need to see this with last 3 months of maxDate. If i select september, it will show jul, ago and sep. If select ago, show ago, jul, and jun.

I'm using a pivot table with MesAno_RABRoteiro and affiliate as dimension. Have just 1 expression, which i've explained.

Thanks !

Community Browser