Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
smilingjohn
Contributor III

Set Analysis

Hi ExpertiseLogic:

      WeekStart                    current      previous                                               difference(currentweek-previousweek) metric 

  12-march-2017                 8                5(this value is 5-march-current week data)          3

   19-march-2017              10                 8                                                                                           2

   26-march-2017              15                10                                                                                        5

 

 

Out Put Table should like this :

Date                                 Tickets

12-march-2017                    3

19-march-2017                  2

26-march-2017                5

 

could you please suggest me how can i achieve solution for this?

 

Thanks in Advance 

1 Solution

Accepted Solutions
Highlighted

Re: Set Analysis

Are you looking for this may be

RangeSum(
RangeSum(Before(TOTAL Count({<Year *= {">2015"}, Status = {'OpenTicket'}>}Key) +  Sum({1<Year *= {">2015"}>}0), 0, ColumnNo(TOTAL))),

-Before(TOTAL RangeSum(Before(TOTAL Count({<Year *= {">2015"}, Status = {'ClosedTicket'}>}Key) + Sum({1<Year *= {">2015"}>}0), 0, ColumnNo(TOTAL))))
)

View solution in original post

12 Replies
Highlighted
Partner
Partner

Re: Set Analysis

Hi John,

 

I think your desired expression for the last week data only should look like this:

Count({<Year*={">2015"},Status={'OpenTicket'}, Weekstart ={"=$(=Max(Weekstart))"}>} Key)

Keep in mind this will work only if you have the Weekstart field in your default date format. Otherwise you will have to set the format individually.

 

PS: I'm perplexed by this par: Sum({1<Year*={">2015"}>}0)

This should basically do + 0. Most likely it was placed there so it will force those weeks in 2016 onward with 0es to appear even if no Key values are associated.

 

Kind regards,

S.T.

Highlighted
smilingjohn
Contributor III

Re: Set Analysis

This is not working 

Highlighted

Re: Set Analysis

Shouldn't it be just this?

Count({<Year*={">2015"},Status={'OpenTicket'}>}Key) + Sum({1<Year*={">2015"}>}0)

You are just non-cumulating the cumulative distribution... isn't it? 

Highlighted
smilingjohn
Contributor III

Re: Set Analysis

Hi Sunny sir , 

Hi Sir i want to show a table with the difference of the two expression . And the new table will should show the cumulative with always Subtracting the current week to previous week      . 

I used your expression but that is not giving me the desired result , Need your help on this 

 

Thanks 

 

Highlighted

Re: Set Analysis

You can just call me Sunny.

I am not sure I understand what is going on? Can you share an example showing the issue you have?

Highlighted
smilingjohn
Contributor III

Re: Set Analysis

Confused

 

Thanks 

Highlighted

Re: Set Analysis

I don't see any attachment with the above post?

Highlighted
smilingjohn
Contributor III

Re: Set Analysis

No luck

Highlighted

Re: Set Analysis

Are you looking for this may be

RangeSum(
RangeSum(Before(TOTAL Count({<Year *= {">2015"}, Status = {'OpenTicket'}>}Key) +  Sum({1<Year *= {">2015"}>}0), 0, ColumnNo(TOTAL))),

-Before(TOTAL RangeSum(Before(TOTAL Count({<Year *= {">2015"}, Status = {'ClosedTicket'}>}Key) + Sum({1<Year *= {">2015"}>}0), 0, ColumnNo(TOTAL))))
)

View solution in original post