Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue in using expression in stacked bar chart

Hi All,

Can Anybody help me out in this issue,

I am using one Stacked bar chart to do analysis of product.

I am taking 'year' and 'Product_category' as dimension and 'count of product in percentage' (Count of each product/Count of all the product)as expression . For that I am using the following Expression.

count( distinct if ( Volume > 0, Product))/count({$<Product=>} total distinct if ( Volume > 0, Product))

It shows 100% in chart If I select a particular year. But If I see for all the years, its taking "Count of each product / Count of product for all the year". I need an expression like, If we not select any particular year also it should count each product and do division for that particular year.

For eg:

YearProduct CategoryProduct in %CountI need like
2005A0%00
2005B1%21.503759
2005C0%10.75188
2005D12%3828.57143
2005E1%43.007519
2005F14%4332.33083
2005G15%4533.83459
2005Total43%133100%
2006A0%00
2006B2%52.777778
2006C0%10.555556
2006D16%4927.22222
2006E2%52.777778
2006F16%4927.22222
2006G23%7139.44444
2006Total58%180100%
2007A0%1
2007B2%6
2007C0%1
2007D14%43
2007E3%9
2007F15%48
2007G30%92
2007Total65%200
2008A0%1
2008B0%1
2008C0%0
2008D6%18
2008E5%15
2008F1%4
2008G20%61
2008Total32%100
2009A0%0
2009B0%0
2009C0%0
2009D15%45
2009E4%13
2009F0%0
2009G11%34
2009Total30%92
2010A0%0
2010B0%0
2010C0%0
2010D13%40
2010E1%3
2010F0%0
2010G1%3
2010Total15%46
Total100%Products: 310


If I am not selecting any particular year also, It should show me the 100% value for the products.

Please reply me soon,

Thanks in Advance!

Kirthi

0 Replies