Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Chart with sales per month per product

‌Hi all,

im currently working on analyzing my sales for the past year. Almost everything is done but I miss one graph. I would like to see my sales of the past year per month per productsegment. i want to see the trend, so I tried the Aggr function.

The syntax I was using was: Aggr(sum(Ordersales),Ordermonth,Productsegment). When I did this, the graph didn't turn up. It says No data to display.

What am I missing here?

thanks in advance!

5 Replies
Highlighted
vinieme12
Esteemed Contributor II

Re: Chart with sales per month per product

You need to encapsulate AGGR() into an aggregation function like SUM , MAX , Min etc because AGGR() basically creates  a virtual table and you need an aggregation function to return a single value

try below

SUM( Aggr(sum(Ordersales),Ordermonth,Productsegment))


or simply,


SUM( TOTAL   <Ordermonth,ProductsegmentOrdersales)



read more here

When should the Aggr() function NOT be used?

Not applicable

Re: Chart with sales per month per product

Thank you for your input Vineeth!

When I try the first syntax, I get the same as before. No data to display.

The second syntax works, but I get the total sales per month. I wanted to get the total sales per product segment per month. I still cannot get that to work..

Thanks in advance!

ahaahaaha
Honored Contributor

Re: Chart with sales per month per product

Hi,

Do you have two dimensions on the chart - Ordermonth and Productsegment?

vinieme12
Esteemed Contributor II

Re: Chart with sales per month per product

can you post some sample data or sample app? with expected output

Not applicable

Re: Chart with sales per month per product

I solved it with some listboxes from where I can choose from.. Thank you for your help!

Community Browser