Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

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
zied_ahmed1
Specialist
Specialist
Author

rahulpawarb
Specialist III
Specialist III

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

zied_ahmed1
Specialist
Specialist
Author

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

rahulpawarb
Specialist III
Specialist III

Hello Zied,

May be this:

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

Please correct me if I misunderstood.

Regards!

Rahul

zied_ahmed1
Specialist
Specialist
Author

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

zied_ahmed1
Specialist
Specialist
Author

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

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