Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way that it's possible to create a button where I can just switch from YTD data to recent 30 days.
The answer is still yes. Can be conditional load:
IF VAR='YTD'
<load script>
ELSE
<another load script>
ENDIF
But this is not the right way to use QlikView. Normally you load all relevant data, and use selections/conditions/whatever on the front end, rather than reload different data every time.
The answer is yes. You didn't ask how, but just in case a simple example is attached.
In a way I want the button to be able to change the where clause in the following sql
SELECT DATENAME(month,CREATED) as [Month],
DATEPART(Year,Created) as [Year],
COUNT(ID) as [NumberOfTickets]
from
where
CREATED BETWEEN DATEADD(yy, DATEDIFF(yy,0,'2014-12-31'),0) AND '2014-12-31' -- this can be used as year to date
group by DATENAME(month,CREATED),
DATEPART(Year,Created),
DATEPART(month,CREATED)
order by
DATEPART(Year,Created),
DATEPART(month,CREATED)
or maybe for every button it loads a different sql statement.
The answer is still yes. Can be conditional load:
IF VAR='YTD'
<load script>
ELSE
<another load script>
ENDIF
But this is not the right way to use QlikView. Normally you load all relevant data, and use selections/conditions/whatever on the front end, rather than reload different data every time.
Thanks for your help!