Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I made 3 tables and resource is from the same data.
Table 1(CNC Status) : Filter the SimpleSignalName = FAN , Bat , Act ....etc
Table 2(Servo Status) : Filter the SimpleSignalName = Amp , Zero , Temp ....etc
Table 3(Spindle Status) : Filter the SimpleSignalName = Spindle , spd ....etc
Original , I think 3 tables are without relation ,When I select someone in table 1
Table 2 and Table 3 data are disapointed.
Maybe you will ask why i don't select at making table,Because I want to make some default data to support customer to select.
So how could i make it without relation??
Oh, MY GOD .
I got it.
Thank you for answering my question so patiently ,Petter
Finally, My result code like below :
QUALIFY *;
[CNC]:
LOAD
[L1Name],
[signalname],
[value],
[SimpleSignalName]
RESIDENT [L1Signal_Pool_Active] WHERE WildMatch(SimpleSignalName, '*sig*','*pro*','*comment*','*modal*','*parts*','*time*','*cnc*','*emg*','*mode*','*seq*');
[SV]:
LOAD
[L1Name],
[signalname],
[value],
[SimpleSignalName]
RESIDENT [L1Signal_Pool_Active] WHERE WildMatch(SimpleSignalName, '*servo*','*pos*','*pulse*','*zero*','*srv*','*apc*');
[SP]:
LOAD
[L1Name],
[signalname],
[value],
[SimpleSignalName]
RESIDENT [L1Signal_Pool_Active] WHERE WildMatch(SimpleSignalName, '*spdl*','*spindle*','*acts*','*sigenb*');
Can you tell us all of the names of the fields in each of the three tables?
table 1 (CNC Status) expression :
=if(WildMatch(SimpleSignalName, '*sig*','*pro*','*comment*','*modal*','*parts*','*time*','*cnc*','*emg*','*mode*','*seq*'
),SimpleSignalName)
table 2 (Servo Status) expression :
=if(WildMatch(SimpleSignalName, '*servo*','*pos*','*pulse*','*zero*','*srv*','*apc*'
),SimpleSignalName)
Table 3 (Spindle Status) expression :
=if(WildMatch(SimpleSignalName, '*spdl*','*spindle*','*acts*','*sigenb*'
),SimpleSignalName)
They are all from SimpleSignalName data.
These are the expressions for the measures in your table in the UI.
I was asking about the field names of the three tables in you data model. They determine how the values in various fields are associated (related). Could you please give us the names of all the fields in the three tables. You can find them in the Data Model Viewer. Maybe you can make a screenshot of that and post it here?
Hi Shih, the way that the data engine in QlikSense works is that it automatically performs a join in the background on any two fields with exactly the same name.
Eg, if you have two unrelated tables, eg Sales and SafetyIncidents, but they both have a field called [Date], then QlikSense will connect those tables using the field [Date]. Selecting a value in SafetyIncident will filter that table, and then also filter sales for any matching dates.
The solution is to rename any fields that are the same. Easiest way to do this is to go into the data model viewer and look at the connecting lines between the tables, and which fields they are connecting, then go back into the script and rename those fields.
Alternately, you can use the Qualify statement to automatically prefix tablenames to the start of field names. Just type
Qualify *;
before any tables you wish this to apply to, and then after the table has loaded type
Unqualify *;
To ensure it doesn't get applied anywhere else. This will transform all fieldnames into the format Tablename.Fieldname
Erica
I think i post my qvf , maybe it is quickly to let everyone know my proble
Thanks for everyone reply.
Hi Shih, not sure what this is telling me, there only seems to be one table loaded in there?
Are you getting confused between the fields and the tables? And did you want to split the table out into 3 tables, is that what you are trying to do?
Erica
Yes, this is my problem.
I just only one table loaded.
I want to split it into 3 tables and 3 tables are not any relation(3 tables filters can be selected independly)
Why i don't want to load 3 times??
Because now this data is very small.In the future,the data will become very bigger .(More than 100 thousand)
So if i load 3 times ,it will spend a lot of time.
You could load one field each time from SQL?
SQL SELECT L1Name FROM MTLINKi.`L1Signal_Pool_Active`;
SQL SELECT signalname FROM MTLINKi.`L1Signal_Pool_Active`;
SQL SELECT value FROM MTLINKi.`L1Signal_Pool_Active`;
Erica
The quickest modification would be to do like this - by adding a new Section at the end of you load script:
I have attached the text also.