Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Time Elapssed

Dears,

Here is my case

i have already build last year a chart (line chart) that calculate to me the time elapse so i can i see the achievement Vs Time Elapsed.

here is my expression:

num
(
(
max({1<[RM Year]={"=2016"}>}[RM PeriodDate]) - num(Daystart(YearStart(Date(max({1<[RM Year]={"=2016"}>}[RM PeriodDate]))))) +1
)
/
$(=num(dayStart(YearEnd(max({1<Year={$(=max(Year))}>}[RM PeriodDate])))) - num(DayStart(YearStart(date(max({1<Year={$(=max(Year))}>}[RM PeriodDate])))))+1)
,'#,##0%')

i need to do not show 2016 when i am not selecting any year (i need to show the maximum year)

how can i write the Expression ?

Hope you can help Thanks.

5 Replies
sunny_talwar

May be this:

num
(
(
max({1<[RM Year]={"$(=Max([RM Year]))"}>}[RM PeriodDate]) - num(Daystart(YearStart(Date(max({1<[RM Year]={"$(=Max([RM Year]))"}>}[RM PeriodDate]))))) +1
)
/
$(=num(dayStart(YearEnd(max({1<Year={$(=max(Year))}>}[RM PeriodDate])))) - num(DayStart(YearStart(date(max({1<Year={$(=max(Year))}>}[RM PeriodDate])))))+1)

,'#,##0%')

mario-sarkis
Creator II
Creator II
Author

Thank you sunny , it works good but the second line chart that shows the achievement vs time elapssed it show an error (i think the problem the problem is when calculate the target in the each year below is the Expression i am using) Count(DISTINCT
{
1

<

[BRANCH]=$::[BRANCH]
,
[RM User]=$::[RM User]
,
[RM Full Name]=$::[RM Full Name]
,
Allocation_Flag={'Allocated','Not Allocated'}
,
CMSInteractionType={'External Visit'}
,
[RM Year]={"$(=Max([RM Year]))"}
,
[RM PeriodDate]={">=$(vYearStart) <=$(vMaxDate)"}

>

}
CMSParty_Id & RMCMSInteractionDate)
+
Count(DISTINCT
{
1

<

[BRANCH]=$::[BRANCH]
,
[RM User]=$::[RM User]
,
[RM Full Name]=$::[RM Full Name]
,
Allocation_Flag={'Allocated'}
,
CMSInteractionType={'Branch Visit'}
,
[RM Year]={"$(=Max([RM Year]))"}
,
[RM PeriodDate]={">=$(vYearStart) <=$(vMaxDate)"}

>

CMSParty_Id & RMCMSInteractionDate))

/

(
sum

(
{
1
<

[BRANCH]=$::[BRANCH]
,
[RM Full Name]=$::[RM Full Name]
//,[RM Year]=$::[RM Year]
,[RM Year]={"$(=Max([RM Year]))"}
,
[RM Month]=$::[RM Month]
,
[RM Quarter]=$::[RM Quarter]
,
[RM MonthName]=$::[RM MonthName]

// ,[RM Calls PeriodDate]={$(=num(daystart(monthend(Max({1<[RM Year]=$::[RM Year],[RM Month]=$::[RM Month],[RM Quarter]=$::[RM Quarter],[RM MonthName]=$::[RM MonthName],[RM Day]=$::[RM Day]>}[RM CustTargPeriodDate])))))}
  ,[RM Full Name]=$::[RM Full Name]
,
[RM Visit Record Type]={'Visits Targets'}

>
}
[RM Visit Target])) (My Problem in the Denominator since i am getting a value from the Denominator)

Thank you for you help sunny !

sunny_talwar

What is the exact error are you seeing? or are you referring to incorrect numbers as an error?

mario-sarkis
Creator II
Creator II
Author

Hey Sunny sorry for the late Reply

here what it shows me :

it should be an increasing % not the same value .

Hope you can help

sunny_talwar

I think it would be easier to sort this out if you are able to share a sample?