Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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)
13 Replies
kppiee
Contributor II
Contributor II
Author

Is there another way to get same result

sunny_talwar

What is wrong with this one? I mean without knowing the whole problem, it would be difficult to provide you a solution which fits your need

kppiee
Contributor II
Contributor II
Author

Based on count column I need to create one more conditional column and I have a big table where I need count on diffrent columns like

IDNameDataDistinc Count(ID,Name)Result
1AKPI2if (count =2, Result, else Blank()
1AKPI2if (count =2, Result, else Blank()
1ARI3if (count =2, Result, else Blank()
1ARI3if (count =2, Result, else Blank()
1ARI3if (count =2, Result, else Blank()
2BSP1if (count =2, Result, else Blank()
2BTS1if (count =2, Result, else Blank()
sunny_talwar

May be use two left joins....

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

Left Join (TableName)
LOAD ID,
     Name,
     Data,
     Count as Result
Resident TableName
Where Count = 2;