Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
hartleyr
Contributor III
Contributor III

Why do my relationships not exist?

Hi All

I've been working within Qlikview for the past couple of years and am currently working on flexi reporting; allowing the users to determine what they want to see by utilising list boxes (converted to tick boxes) and conditions on the table which holds all the data.

My data structure consists of 3 Qlikview files; 1 x QVD that pulls in the raw data, 1 x QVD that simply manipulates the data (i.e renaming and the addition of table linking keys) and the application.

In the application, I pull my data into a star schema (diagram of which is attached).  Effectively, our data set contains customers that link to contracts that link to tickets.  My measures are at ticket level, and I want to be able to have the flexibility to report across any of these data sets.

What is confusing me, is if I want to look at Account number, Contract number, Direction, Haulier Name, Haulier Address and Haulier RWCN in my table I can, however if I add another field from my haulier table such as 'Haulier Postcode', all the information disappears.

I see this throughout the tables set up within the star schema - i.e. if I add in 'Customer' (which is in the same table as 'Account No') again the table of information disappears.

Any help and pointers would be greatly appreciated.

I'm happy to share code, but I'm afraid cannot share data or QVD files due to confidentiality reasons

Cheers

Rebekah

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The problem is that you're using the GetFieldSelections function. It has default value of six for the number of results it will return. If there are more results and you want to list them all then you need to add a parameter to the GetFieldSelections function. Try these two expressions in text boxes to see the difference:

=GetFieldSelections([_Dimension_TIM Transactional])

=GetFieldSelections([_Dimension_TIM Transactional], ',', 99)


An additional gotcha is that 'like *$1*' will also match values that contain as substring the value you passed. You can see that if you select the value "Customer Order Number". You'll see that the column Customer will also be shown.


A solution that doesn't have the above problems is:


max( match([_Dimension_TIM Transactional],'$1'))


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

Perhaps you can create a small qlikview document that demonstrates the problem. Scramble any confidential information to make it indecipherable for anyone that doesn't have access to the source data. See this document for more information: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand
vinieme12
Champion III
Champion III

The problem lies in your script where your table load is silently failing,

Please post your load script

Cheers

V

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
hartleyr
Contributor III
Contributor III
Author

Thanks chaps.  I will post this shortly for you

hartleyr
Contributor III
Contributor III
Author

Thanks Vineeth and Gysbert

Attached are my secondary load script and App.  It was great advice on the scrambling - Thanks!

Gysbert_Wassenaar

The problem is that you're using the GetFieldSelections function. It has default value of six for the number of results it will return. If there are more results and you want to list them all then you need to add a parameter to the GetFieldSelections function. Try these two expressions in text boxes to see the difference:

=GetFieldSelections([_Dimension_TIM Transactional])

=GetFieldSelections([_Dimension_TIM Transactional], ',', 99)


An additional gotcha is that 'like *$1*' will also match values that contain as substring the value you passed. You can see that if you select the value "Customer Order Number". You'll see that the column Customer will also be shown.


A solution that doesn't have the above problems is:


max( match([_Dimension_TIM Transactional],'$1'))


talk is cheap, supply exceeds demand
hartleyr
Contributor III
Contributor III
Author

Thanks Gysbert, that works perfectly.

Thank you very much for your help!