# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for
Did you mean:  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  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')

18 Replies  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')  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  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.  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.  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..   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.  Master III

Is it possible to post the sample?  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.  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') Community Browser