Qlik Community

Qlik GeoAnalytics Discussions

Discussion Board for collaboration regarding Qlik GeoAnalytics.

elixirsol
New Contributor

Not able to produce bar graph with date factor

Hi,

I am trying to plot a bar graph with Product as dimension and Backlog as measure. I am not able to produce a bar graph with the date factor in the Backlog query. The query is as follows: sum ( {<Sales_Order_Date = {"<=$(=vDate)"}, SO_Order_Backlog_Flag = {1},In_Out = {"Out"}, SO_Order_Status = {'Completed'} >} SO_Product_Amt)

Although, I am able to get the chart if I remove the date factor.

Pls help.

1 Solution

Accepted Solutions

Re: Not able to produce bar graph with date factor

Try this:

LET vDate = date(date#('15-Feb-2017', 'DD-MMM-YYYY'), 'FormatFromSalesOrderDate');

sum ( {<Sales_Order_Date = {"<='$(vDate)'"}, SO_Order_Backlog_Flag = {1},In_Out = {"Out"}, SO_Order_Status = {'Completed'} >} SO_Product_Amt)

- Marcus

4 Replies

Re: Not able to produce bar graph with date factor

I think that your date-variable won't be correctly interpreted - to check this change your chart into a table-chart and remove a possible label for this expression and then take a look on the lable-field in which qlik displayed how the expression-parts are evaluated (you might need another dummy-expression like = 1 therewith the chart contained data through a working expression).

- Marcus

elixirsol
New Contributor

Re: Not able to produce bar graph with date factor

Hi Marcus,

Thanks for your prompt response. However, I'm unable to plot the graph in QlikSense. The Set Analysis works fine in QlikView.

I'm creating the variable like this in the script.

LET vDate = Date#('15-Feb-2017');

Re: Not able to produce bar graph with date factor

Try this:

LET vDate = date(date#('15-Feb-2017', 'DD-MMM-YYYY'), 'FormatFromSalesOrderDate');

sum ( {<Sales_Order_Date = {"<='$(vDate)'"}, SO_Order_Backlog_Flag = {1},In_Out = {"Out"}, SO_Order_Status = {'Completed'} >} SO_Product_Amt)

- Marcus

elixirsol
New Contributor

Re: Not able to produce bar graph with date factor

Thanks a lot Marcus. It worked.

Community Browser