Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
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');
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
Thanks a lot Marcus. It worked.