Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DamienSer
Contributor
Contributor

Last 6 month withou current month

Hello,

I trying to create a function in order to have the count of Incident for the last 6 month without currect mont.

I've created both Measure because I've a chart with two bars : 

=Count({<CI_APPLI_INFRA={'Infrastructure'}>}CI_APPLI_INFRA) + Sum({1} 0)
=Count({<CI_APPLI_INFRA={'Application'}>}CI_APPLI_INFRA) + Sum({1} 0)

On dimension case I've added that : "MonthYears".

Do you know how can I do that ? 

I think I've to add one more thing on my both measures.

Many thanks for your help !

Labels (2)
1 Reply
rahulpawarb
Specialist III
Specialist III

May be this:

Count({<CI_APPLI_INFRA={'Infrastructure'}, Date={">=$(=MonthStart(AddMonths(Max(Date), -6))) <=$(=MonthEnd(AddMonths(Max(Date), -1)))"}>}CI_APPLI_INFRA)

 

Count({<CI_APPLI_INFRA={'Application'}, Date={">=$(=MonthStart(AddMonths(Max(Date), -6))) <=$(=MonthEnd(AddMonths(Max(Date), -1)))"}>}CI_APPLI_INFRA)

 

P.S: Date is the field from Master Calendar table.

 

- Rahul