Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi All

I have below expression work fine :-

=if(Match(SOURCE,

'TDSID',

'G2-AP')

, SOURCE)

Above expression will list SOURCE = TDSID , When SOURCE Is not select.

Now my issue is when user select SOURCE - TDSKL , IT There any way i can force the table display SOURCE=TDSID

mY Objective is to use this for qlik sense , as QS don't have button action.

Paul

1 Solution

Accepted Solutions

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Create a Table

Dimension

COMPANY

SOURCE


Expression

IF(GetSelectedCount(SOURCE), SUM({<SOURCE+={'TDSID','G2-AP'}>}(days3 + days6 + days9 + curren)),

SUM({<SOURCE={'TDSID','G2-AP'}>}(days3 + days6 + days9 + curren)))

16 Replies
paulyeo11
Valued Contributor II

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

my QVW

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi,

Your requirement not clear. where you want to implement it in straight table/ pivot table or table box

If you are using it in expression then write set analysis

sum({<source={"TDSID"}>}measure)

Regards

Regards,
Prashant Sangle
paulyeo11
Valued Contributor II

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

hI mAX

It work , but when user select SOURCE = TDSKL , The table display blank. How to make it display ?

Paul

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi,

what is source? a field from table?

It must work. because in this expression you are hardcoded value of source so it will not get impacted by any selection.

Regards,

Regards,
Prashant Sangle
paulyeo11
Valued Contributor II

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi Max

SOURCE is a field from sales Table.

for example SOURCE = TDSKL , Refer to malaysia

for example SOURCE = TDSID , Refer to indonesia

IF Not select any thing from SOURCE , It work fine.

Paul

jyothish8807
Honored Contributor II

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi Paul,

Try like this:

Sum({<Year={'2016'}, source={'TDSID'}>}Sales)

Regards

KC

Best Regards,
KC

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi,

try with if condition with getselectedCount() and getFieldSelection()

Regards

Regards,
Prashant Sangle
paulyeo11
Valued Contributor II

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

hI mAX

I prepare a more simple data file, for this QVW , it only have payment table , compare to previous on include all table, may be you can take a look where i go wrong ?

Paul

paulyeo11
Valued Contributor II

Re: In SET even i select year=2016 , it can display sales for year = 2015. How above can i force table display SOURCE=TDSKL , WHEN USER SELECT SOURCE=TDSS ?

Hi Jyo

I have try but still cannot.

Paul

Community Browser