Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
1 Solution

Accepted Solutions
Highlighted

Re: Calculated field use of Variable

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
Highlighted

Re: Calculated field use of Variable

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)

Highlighted
Contributor II
Contributor II

Re: Calculated field use of Variable

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

Highlighted
Community Manager
Community Manager

Re: Calculated field use of Variable

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

Sue Macaluso
Highlighted
Contributor II
Contributor II

Re: Calculated field use of Variable

QlikSense

Highlighted

Re: Calculated field use of Variable

You want to do that in the script?

Highlighted
Contributor II
Contributor II

Re: Calculated field use of Variable

Yes, if it possible from script 

Highlighted

Re: Calculated field use of Variable

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

Highlighted
Contributor II
Contributor II

Re: Calculated field use of Variable

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

Highlighted

Re: Calculated field use of Variable

It will remain as long as the Left Join exists 🙂