# Qlik Sense Deployment & Management

Contributor III

## Put this Formula in set analysis

Hello,

i have this Formula and would like to add it in a set analysis

Actif/ Day(MonthEnd(Date(Date#(GetFieldSelections(Month_actif), 'MMM')))).  I need to add vSetPeriodPres and a field type in our

SetAnalysis

Regards

6 Replies
Contributor III

## Re: Put this Formula in set analysis

Valued Contributor III

## Re: Put this Formula in set analysis

Hello Zied,

Could you please elaborate more on this requirement as well as provide prior Expression where we need to include new one? This will help me to understand the situation in better way.

Regards!

Rahul

Contributor III

## Re: Put this Formula in set analysis

Hello Rahul,

I have to know how many the car is actif in a month :

count_Actif_1:

Load distinct(car),Month(Date) as Month_actif,Year(Date) as Year_actif,

count(1) as Actif

resident table

where "Statut"= Actif'

group by car,Month(Date),Year(Date);

so i use this Ratio to know,

So now i need to but this Ratio to a SetAnalysis to add some variable like VsetPeriodPres and type_car ...

Regards

Valued Contributor III

## Re: Put this Formula in set analysis

Hello Zied,

May be this:

Count({<Month_actif={'Jan'}, Statut={'Actif'}>}car)

Please correct me if I misunderstood.

Regards!

Rahul

Contributor III

## Re: Put this Formula in set analysis

I think we need to use Actif and not Statut=Actif because we have in the script

Load distinct(car),Month(Date) as Month_actif,Year(Date) as Year_actif,

count(1) as Actif

Contributor III

## Re: Put this Formula in set analysis

another thing...in the Ratio we have to add / number of days of the month

(Day(MonthEnd(Date(Date#(GetFieldSelections(Month_actif), 'MMM')))))