Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
slribeiro
Partner - Creator
Partner - Creator

Problem with data formula (string = '')

Hello.

I'm trying to implement a algorithm that for today (15/07) should appear always the YTM value (06/2016).

When we don't have selections should show "> 06.2016" and when we are using selections should appear the value of selection (ex: "> 04/2015"

When I do select it works perfectly:

Screenshot_2.jpg

But then when I remove my selections it appears like this (without the calculation) and what bothers me is that the same formula works on a text box:

Screenshot_3.jpg

Formula without selections:

'> ' & max({1<Facts.LYTM_Flag={'1'}>}date(%Date,'MM.YYYY'))

Formula with selections:

'> '& max(date(addyears(%Date,-1),'MM.YYYY')))

If you could help me I really apreciate.

Many thanks

and best regards.

1 Reply
Not applicable

use de functio getselectcount:

if(GetSelectedCount(your fied)>0,'> '& max(date(addyears(%Date,-1),'MM.YYYY'))),'> ' & max({1<Facts.LYTM_Flag={'1'}>}date(%Date,'MM.YYYY')))

you can beter de expression.