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: 
poonam_kulwal
Partner - Creator
Partner - Creator

Count in bar chart in qlikview

Hi All,

I am facing challenge to plot bar chart.

I have a sample store data with two tables Product_InStock and Product_Sold.

What I need to find out, How many times Product reached Out of Stock in a month/Year .

I want to plot a bar char with Products on X axis and respective Count on Y axis.

As shown in the image.

pic.png

I am able to get dates for which Product is out of stock in Pivot table form but not able to get count in bar chart.

pic2.png

I want to keep both table separate as this is just a very small part of big script. This is how two tables are connected to calendar.

I have attached my sample file with data.

Appreciate your help on this.

Thanks & Regards,

Poonam

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this

=Count(DISTINCT Aggr(If(Max({<InStock_Category = {'Type B'}>}[Quty InStock]) = Max({<Category = {'Type B'}>} [Quty sold]), Date), Product, Date))

View solution in original post

2 Replies
sunny_talwar

Try this

=Count(DISTINCT Aggr(If(Max({<InStock_Category = {'Type B'}>}[Quty InStock]) = Max({<Category = {'Type B'}>} [Quty sold]), Date), Product, Date))
poonam_kulwal
Partner - Creator
Partner - Creator
Author

Thank you Sunny for quick help!
Appreciate your help.