Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Need to Show data after Aug-2016

Hi All,

I have below requirements. I need to show no if inc count which came after Aug-2016 with other certain condition. Below is my expression:

Count({$<[Incident_Month_Year]={'>=2016-Aug'},inc_flag={'Closed'},inc_priority={'1'}>} distinct inc_number)

But in this case the KPI is static. Value is not changing with the selection of months. It is always showing 145.

Please suggest.

Thanks,
Sarif

16 Replies
sushil353
Master II
Master II

Try this:

Count({$<[Incident_Month_Year]={">=2016-Aug"},inc_flag={'Closed'},inc_priority={'1'}>} distinct inc_number)


assuming the [Incident_Month_Year] have the same format as 2016-Aug..


if not then try this:

Count({$<[Incident_Month_Year]={">=$(=Date(Date#('2016-Aug','YYYY-MMM')))"},inc_flag={'Closed'},inc_priority={'1'}>} distinct inc_number)



mhmmd_srf
Creator II
Creator II
Author

yea.. both are in same format..that is why it is returning value..but your expression is always showing 0.

Please help

krishna20
Specialist II
Specialist II

use below expression


please by pass the Incident_Month_Year in expression


Count({$<[Incident_Month_Year]={">=2016-Aug"},inc_flag={'Closed'},inc_priority={'1'},Incident_Month_Year=>} distinct inc_number)


mhmmd_srf
Creator II
Creator II
Author

Hi Kalyan,

No sir..it is showing result for all period. And not changing value with selection of Year-Month.

Please help.

Sarif

teiswamsler
Partner - Creator III
Partner - Creator III

Hi Mohammed

When selecting Aug, following expression will Count from Aug and forward.

Count( distinct  {<

[FieldYouAreMakingDateSelectionsIn]=,

[Datefield] = {">=$(= Monthstart( Max( [Datefield] ) )"},

inc_flag={'Closed'},

inc_priority={'1'}

>} inc_number )

/Teis

dimitar_angelov
Partner - Contributor II
Partner - Contributor II

Right off the bat I can tell you set expressions are considered as "filters" before the layot filters. Means they overrun layout selections. In your expression everything is hard coded and the data is always shown for the available moths after Aug. And your layot selections on Month will not affect the result. You need to rework this according to your logic. Your KPI is static regarding months with this expression.

If you explain what you need to see (you said data after Aug, and it should be showing it) I might be able to help.

mhmmd_srf
Creator II
Creator II
Author

not working sir

teiswamsler
Partner - Creator III
Partner - Creator III

Hi Mohammed

Can you shared a sample app?

/Teis

tresesco
MVP
MVP

First check has to be done - if your field [Incident_Month_Year] type is string or a proper date. If it has string type data , your expression would not work the way you want. You have to create it in the script using date(), something like:

Load

          Date( DateField, 'YYYY-MMM') as [Incident_Month_Year]


Rather than a string calc like:


Load

           Year&'-'&Month as [Incident_Month_Year]   // This is NOT recommended