Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

requirement

I have an expression:

num(count({$}distinct id)/count({1}total distinct id)),'###.%')

now my id has been split into two: id1 and id2 ,so what will be the correct syntacx to write this

10 Replies
thevingo
Creator
Creator

can you elaborate

Anonymous
Not applicable
Author

=num(

count({$}DISTINCT id1)/count({1}total DISTINCT id2)+count({$}DISTINCT id1)/count({1}total DISTINCT id2)

,'###.%')

is it a correct syntax ?

Anonymous
Not applicable
Author

can anyone help on this?

thevingo
Creator
Creator

may be stalwar1

sunny_talwar

So let me understand this... you had this

ID

1

2

3

4

and now it is like this

ID1, ID2

1, -

2, -

-, 3

-, 4

?

Anonymous
Not applicable
Author

both ids have the value,

its just that ist been segregated on the basis of some type,

where as in id1+id2 =total id value

I just need to cross check on my set analysis expression

sunny_talwar

Hahahaha, I am not sure I understand... is it possible to demonstrate what change with an example (just like how I showed what I interpreted)?

Anonymous
Not applicable
Author

your understanding is correct,its like that only

how to write the syntax now?

sunny_talwar

Try this may be

Num(Count({$}DISTINCT Alt(id1, id2))/Count({1}TOTAL DISTINCT Alt(id1, id2)), '###.%')