# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for
Did you mean:
Contributor III

## Set Analysis Ignore Dimension

Hello

Formula: Previous Month + current Month - Previous Month when Fecha Liquidacion = current Month

i used the method AsOfMonth to calc the previous month. Works fine. Then i used the follow set analysis:

```RangeSum(
sum({\$<
bEsPender={1}
>} Contrato),

Sum({\$<
Tiempo={'Actual'},  //current Month
bEsPender = {1}
>} Contrato),

(sum({\$<
Tiempo={'Pasado'}, //Previous month when Fecha liquidacion = AsOfYear
bEsPender={1},
[Fecha Liquidacion]= {'>=\$(=MonthStart(Max(AsOfYear)))<=\$(=MonthEnd(Max(AsOfYear)))'}
>} Contrato)*-1)
)
```

if i selected a AsOfYear works fine but if selected two ore more not working. The set analysis always take the max AsOfYear

Thanks

1 Solution

Accepted Solutions
MVP

Check the attached

RangeSum(

sum({\$<

bEsPender={1}

>} Contrato),

Sum({\$<

Tiempo={'Actual'},

bEsPender = {1}

>} Contrato),

(Sum({\$<Tiempo={'Pasado'}, bEsPender={1}>}Aggr(If([Fecha Liquidacion] >= MonthStart(Max(AsOfYear)) and [Fecha Liquidacion] <= MonthEnd(Max(AsOfYear)), Contrato), AsOfYear, [Fecha Liquidacion], %cont_id))*-1)

)

6 Replies
MVP

Would you be able to share a sample where we might be able to play around with this?

Thanks,

Sunny

Contributor III

Thanks Sunny

MVP

What do you expect to see in your chart when you have two years selected?

Contributor III

if i selected two month the set analysis take the max AsOfYear, i need take the value of the dimension

in the second image ene. 2017 should be 160

MVP

Check the attached

RangeSum(

sum({\$<

bEsPender={1}

>} Contrato),

Sum({\$<

Tiempo={'Actual'},

bEsPender = {1}

>} Contrato),

(Sum({\$<Tiempo={'Pasado'}, bEsPender={1}>}Aggr(If([Fecha Liquidacion] >= MonthStart(Max(AsOfYear)) and [Fecha Liquidacion] <= MonthEnd(Max(AsOfYear)), Contrato), AsOfYear, [Fecha Liquidacion], %cont_id))*-1)

)

Contributor III

thank you very much for your help.

Tags