Question

Incorrect syntax for parameters on custom fields in Qlik semantic models

  • 26 April 2023
  • 5 replies
  • 53 views

Userlevel 1
Badge

Hi team, 

TimeXtender allows adding parameters from a different table to a custom field in a semantic data model (Qlik). The resulting syntax/qlik script combination is always broken.

When using adding a custom field parameter from a different table, TimeXtender fully qualifies the Qlik syntax regardless of the settings. The resulting syntax on the Qlik side will no longer match the syntax in the views created by TimeXtender:

Qualified setting:

Fully qualified setting:

 

The resulting Qlik Script:

"Sales_Targets":
LOAD
"KPI",
"Target",
"DIM_Boekdatum.DayName" AS "Test";
SQL SELECT
"KPI",
"Target"
FROM "Test"."dbo"."Test QVD_SLQV";

But the view has the following syntax:

CREATE VIEW [dbo].[Test QVD_SLQV]
-- Copyright 2011 timeXtender a/s
-- All rights reserved
--
-- This code is made available exclusively as an integral part of
-- timeXtender. You may not make any other use of it and
-- you may not redistribute it without the written permission of
-- timeXtender a/s.

AS
SELECT
[KPI] AS [KPI]
,[Target] AS [Target]
FROM [dbo].[xxxxx]
GO

TimeXtender should either disallow adding fields from other tables as parameters in custom fields, or add the field on the frontend, similar to measures. Otherwise, timeXtender would have to add a join query to either the Qlik Sense load script or the SQL view. 

Kind regards,

Andrew - E-mergo 


5 replies

Userlevel 4
Badge +5

Hi @andrew.gebhard 

We are able to reproduce this issue, it seems to be occurring because the field you are referencing to in the custom field exists in both the table that you're dragging the field from, but also in the table where you're trying to add the custom field. For example

If I remove the ModifiedDate field from the Currency table, I get the following result

Can you please confirm if this is also the case for you?

Userlevel 1
Badge

Hi Christiaan, 

Thanks for your answer. I will have time to test next week. In your example, are you adding the parameters from a table different than where you are adding the custom field? Would that work properly in any case, regardless of whether qualified/fully qualified is working? 

It's logical to me that TimeXtender would always want to fully-qualify fields that appear in multiple tables. But trying to load ‘ModifiedDate’ into a qlik table from a view where the field ‘ModifiedDate’ does not exist probably won't work either way… 

Kind regards,

Andrew

Userlevel 4
Badge +5

Hi @andrew.gebhard , yes I am adding the parameters from a table different than where you are adding the custom field. I am not sure I understand your second question above - “Would that work properly in any case, regardless of whether qualified/fully qualified is working”, could you please clarify? Please let me know how your test goes 

Userlevel 4
Badge +5

Hi @andrew.gebhard have you had a chance to test yet? 

Userlevel 4
Badge +5

Hi Christian,

Andrew is currently on vacation - so probably keep this on hold for a while...

Reply