Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
sweens78
Creator
Creator

How do I add a field to a fact table

Hi Guys

 

I have a field outside the fact table so when I go to query when using section access it says its doesn't recognise field.

 

Is it a join statement I must use?  If so is there a away to hide so its does skew the data I have in the original Fact table.

This is the statment Im having problems with

LOAD

Num((count(if (Interventions_ID = '1' and TimeBSPAx_ID = '1', NEWKEYID))-Count(if (Interventions_ID = '1' and TimeBSPAx_ID = '1', PatientsNotAssessed_ID)))/(Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%') AS AGGR

Resident
Fact;

 

It doesn't recognise the intervention id but if I put a join where the intervention Id is in the script it see it but it skews my data figures

 

Any ideas?

Join(Fact)
Interventions:
LOAD "Interventions_ID",
"Interventions_Types" AS [Interventions];
SQL SELECT "Interventions_ID",
"Interventions_Types"
FROM "NCPMH_COPY_2".dbo."Dim_Interventions";

1 Reply
lironbaram
Partner - Master III
Partner - Master III

Hi 

script functions in general are calculated on fields in the same table ,

why connecting between the two tables skew your numbers , do you have many to many relations 

may be as you only interested in cases where Interventions_ID =1

you can use it as a where clause in your dimension table connecting only records you are interested in ,

what is the key field between the two tables?