Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

=IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?


Hi All


I using below expression at dimension at table it does not filter G1 company  :-


=IF(GROUP_CLASS='G1',COMPANY)


it work for QV V12 , but does not work for QV9 and QS later version.


May i know it is due to my data model issue ?


Paul Yeo

1 Solution

Accepted Solutions
krishna_2644
Valued Contributor III

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

make sure you just have only one common key fields between any two tables.

Synthetic keys:

1 group of tables in below pic : two common fields ExecPLstart and EXePLEnd between 'Interval Match' Table and ExecProfit Loss.

Similary you can find synthetic keys formed by other fields in other tables in the rest of the table that i've grouped fro you.

1.PNG

15 Replies
paulyeo11
Valued Contributor II

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

My QVW

As i over hear some one said in  the forum that if i manually remove sync key , i will have this issue.

Paul

krishna_2644
Valued Contributor III

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

Have seen you qvw,you are having few synthetic keys and some minor script issues.fix them.

Usually no matter what, 

=IF(GROUP_CLASS='G1',COMPANY) should work unless theres no data or due to some other script issues that is restricting COMPANY data to get populated.


paulyeo11
Valued Contributor II

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

Hi Krishna

Thank you for your comment.

When i do the filter at expression it work.

Paul

paulyeo11
Valued Contributor II

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

Hi Krishna

Appreciate if you Can share with me what is my script issue , so that I can look into it. As I am not sure where I go wrong ?

Paul Yeo

DIrector

TDS Technology (S) P/L

Whatsapp +65 9326 1804

www.tdstech.com<http://www.tdstech.com>

krishna_2644
Valued Contributor III

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

make sure you just have only one common key fields between any two tables.

Synthetic keys:

1 group of tables in below pic : two common fields ExecPLstart and EXePLEnd between 'Interval Match' Table and ExecProfit Loss.

Similary you can find synthetic keys formed by other fields in other tables in the rest of the table that i've grouped fro you.

1.PNG

paulyeo11
Valued Contributor II

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

Hi Kri,

Just to make sure what is your advise , for example in 2 table when they are link you , now there are 2 key , in order to reduce from 2 key to 1 key , i need to use the below script right ? For example my Supplier Table and GL Table have 2 key Date and Source.

autonumber( @1:10T & '_' & 'TDSS' ) as ARKey,

Paul

krishna_2644
Valued Contributor III

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

Its not about reducing 2 fields to 1, its all about linking 2 tables with just ONE key field and that key field should be unique identifier field in the tables.

autonumber( @1:10T & '_' & 'TDSS' ) as ARKey,   - if this composite key is the index key in a table and unique identifier key in another table then yes you can use it, else it wont make any sense joining the tables with this key.you get undesired results on the UI if you dont link/join the tables properly.


Krishna

paulyeo11
Valued Contributor II

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

Hi Kri

Thank you very much , your explaination I can understand.

One more question is now the GROUP_CLASS field is giving me problem , and this field is at my order table.

Can I said that GL Supplier P&L Table ( those table you highlight in the image ) will not affect the GROUP_CLASS field right ?

Meaning my focus is to settle sales order table , should not have more then 1 field link between 2 table right ?

Paul Yeo

DIrector

TDS Technology (S) P/L

Whatsapp +65 9326 1804

www.tdstech.com<http://www.tdstech.com>

krishna_2644
Valued Contributor III

Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

That i cannot comment as i dont know the business understanding of the tables that you are using.

Community Browser