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: 
qlikviewforum
Creator II
Creator II

Flagging in set analysis

Instead of flagging it as 1/0 I want to flag it as TRUE/FALSE. Any idea how this could be achieved?

Only problem here is the date range(from and to), else this could have been straight forward. Can anyone help me out on this?

=IF(

  IF(Limit_Days='l_30',[30 days],

  IF(Limit_Days='l_60',[60 days],

  IF(Limit_Days='l_90',[90 days],

  IF(Limit_Days='TBD',[60 days)

       )

   )

   )<1

  ,sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 1),

  sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 0))

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

As per my understanding, you want to show the text 'TRUE' instead of 1, right?

if so, you can try like..

,Replace(sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 1),1,'TRUE'),

  Replace(sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 0)),0,'FALSE')

View solution in original post

18 Replies
settu_periasamy
Master III
Master III

Hi,

As per my understanding, you want to show the text 'TRUE' instead of 1, right?

if so, you can try like..

,Replace(sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 1),1,'TRUE'),

  Replace(sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 0)),0,'FALSE')

jonathandienst
Partner - Champion III
Partner - Champion III

For true:

...sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} true()),...


and false:


...sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} false()))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qlikviewforum
Creator II
Creator II
Author

Good idea! it does did the trick but the problem it is showing all the dates except from and to date. Any idea what could be the issue? I am looking into that only. Please let me know if you found the issue.

qlikviewforum
Creator II
Creator II
Author

It is showing 0 for TRUE and -1 for FALSE. Where as I want to show TRUE/FALSE instead of 0/-1.

settu_periasamy
Master III
Master III

Can you check your Set Expression Properly working or Not?

For Testing Purpose, Add one More expression, Put your Sum Expression.. Like

=sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 1)


don't give the label. Then Ok.

check, if the date value (From and To ) is correct or not? Like below screen shot..

Picture1.jpg


qlikviewforum
Creator II
Creator II
Author

As you mentioned I have added a new expression to check whether the date range is correct or not. It does gives the expected result.

settu_periasamy
Master III
Master III

Is it possible to post the sample?

qlikviewforum
Creator II
Creator II
Author

I know it would be easy if i can post the example but due to security reasons i cannot attach anything else i would have attached it.

settu_periasamy
Master III
Master III

Ok. Let's give a try..

=Pick(Match(

  IF( IF(Limit_Days='l_30',[30 days],

   IF(Limit_Days='l_60',[60 days],

   IF(Limit_Days='l_90',[90 days],

   IF(Limit_Days='TBD',[60 days))))<1  ,

   sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 1),

   sum(TOTAL{<Period = {'>$(=date($(VMaxPeriod)-$(VDays))) <=$(=date($(VMaxPeriod))) '}>} 0)),1,0),'TRUE','FALSE')