Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
lprasanth
Contributor II
Contributor II

Replacing only function in the chart

Hi guys,

    is there any way we can move the following only function to the load  

idDateStkP       date stock projection

       1                               22/8/2018

        2                              23/8/2018

        3                               24/8/2018

        4                                25/8/2018

        5                                  26/8/2018

         6                                 27/8/2018

         7                                 28/8/2018

=only({<idDateStkP={1}>}[date stock projection]) 

I had to use this function for seven times to calculate certain values in the chart which taking to long to load since I have plenty of data. I also understand the fact that we can't write a set expression in the load. I would like to have some alternative examples to do the same thing in the load. can you guys pls help me out...

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You could do as @pradosh_thakur are writing with an where clause if you are ok with excluding the other rows.

Another approach is to create another date field in your table, like this:

LOAD
idDateStkP,
[date stock projection],
IF(idDateStkP=1,[date stock projection]) as [Your New Date Field]
FROM
DataSource

View solution in original post

2 Replies
pradosh_thakur
Master II
Master II

May be this but it will restrict the data in the app level and not chart level
where idDateStkP= 1 ;

Learning never stops.
Vegar
MVP
MVP

You could do as @pradosh_thakur are writing with an where clause if you are ok with excluding the other rows.

Another approach is to create another date field in your table, like this:

LOAD
idDateStkP,
[date stock projection],
IF(idDateStkP=1,[date stock projection]) as [Your New Date Field]
FROM
DataSource