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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
tamilarasu
Champion
Champion

Expression Help

hello3.gif

I have a data source and needs to calculate the count of prefix's for each customer. In that, I have two classification named as 900 and 901. If the classification is 900, then Count should be 1 (No matter how many lines in the source) and no need to show material. If the classification is 901, then each line should be displayed in the chart with material. I have tried some expression where the result is fine but for 900 it showing all the records (Which is not necessary) Please see the sample and guide me.

Capture.PNG

Many Thanks.

scriptina.jpg

4 Replies
sunny_talwar

Not sure if I understand what you are trying to do? In the image you attached, there are Table = 900, but you are saying those are fine? How are the 900 in green part different from 900 in the red??

jagan
Partner - Champion III
Partner - Champion III

Hi,

You Sno and Sales columns have repeating values so you are getting the duplicate rows, to overcome this move Sales column as expression like Sum(Sales). and remove the Sno from the dimension.

Hope this helps you.

Regards,

jagan.

sunny_talwar

Trying to do this???

Capture.PNG

Removed two dimensions: S.no. and Sales (because they made each row unique) and change the count expression to this:

If(Table = 900, 1, Count({<Table={'901'}>}Mat))

HTH

Best,

Sunny

Not applicable

Remove Sno and Sales in dimentions and add one expression =Aggr(sum(Sales),Customer,Prefix,Table,Cond). You will get desired output.

Please find attached .QVW file.

Thanks,

Uday.