Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
kppiee
Contributor II
Contributor II

Calculated field use of Variable

How to use the variable in the calculated field.  I need the  Distinct count result based on ID and Data like table

IDNameDataDistinct Count(ID,Name)
1AKPI2
1AKPI2
1ARI3
1ARI3
1ARI3
2BSP1
2BTS1
Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Use Left Join 

Left Join (TableName)
LOAD ID,
     Name,
     Data,
     Count(ID) as Count
Resident TableName
Group By ID, Name, Data;

View solution in original post

13 Replies
sunny_talwar

If you only have ID, Name, and Data as dimension, Count(ID) should be enough... but if you have more dimensions, may be this Count(TOTAL <ID, Name, Data> ID)

kppiee
Contributor II
Contributor II
Author

It is the input table with three columns ID, Name and Data. I need to create a new column with  count of ID based on the same data

Sue_Macaluso
Community Manager
Community Manager

@kppiee Are you using QlikView or Qlik Sense? I would like to move this into the correct product forum. Thank you.

Did you find a solution to your question? Mark the solution as accepted : and if you found it useful, press the like button!
kppiee
Contributor II
Contributor II
Author

QlikSense

sunny_talwar

You want to do that in the script?

kppiee
Contributor II
Contributor II
Author

Yes, if it possible from script 

sunny_talwar

Use Left Join 

Left Join (TableName)
LOAD ID,
     Name,
     Data,
     Count(ID) as Count
Resident TableName
Group By ID, Name, Data;
kppiee
Contributor II
Contributor II
Author

if I reload the data than the calculated field will remain or delete?

sunny_talwar

It will remain as long as the Left Join exists 🙂