Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gauravgg
Partner - Creator
Partner - Creator

Show Unique count and Common count ?

Hi

I have the following type of data

 

ModelPartsCost
AP1100
AP2200
AP3300
BP1100
BP2200
BP3300
BP4400
BP5500
CP2200
CP3300
CP4400
DP8800

I want to show the following two question in Bar graph in qlik sense

How many parts are used accross models?

i.e As we can see in the above table, Parts:- P1,P2,P3,P4  are used in more than one model .

&

How many of the parts are unique ?

i.e As we can see in the above table Parts:- P5,P8 are used only in Model B and Model D respectively .



I want to show it in Bar graph


Were

Dimension = Model


Expession1 for  count of parts in that model

Expression2 of count of unique parts in that model





Can anyone help me in this


thanks in advance


4 Replies
Anil_Babu_Samineni

May be like?

Dimension - Model

Expressions are

i)  Count(parts)

ii) Count(DISTINCT parts)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

what is expected output in numbers?

effinty2112
Master
Master

Hi Gaurav,

Parts used in more than one model:

=concat(Aggr(if(Count(DISTINCT Model) >1,Parts),Parts),',')

returns

P1,P2,P3,P4

Parts used in only one model

=concat(Aggr(if(Count(DISTINCT Model) =1,Parts),Parts),',')

P5,P8

Your bar chart

1.jpg

The blue bar shows number of parts, the red the number of parts used only in that model.

Cheers

Andrew

gauravgg
Partner - Creator
Partner - Creator
Author

Thanks andrew for relpy

I also want the count of parts which are present in  all the models ?

Can u help me in this

Thanks in advance