Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to QlikView and having one issue while designing graphs. The issue is
I had a graph objects which display the sales data for the selected year and year - 1. The expresssions are as below.
Sum
({$<Year={$(=Max(Year))}>} [sales]) and Sum({$<Year={$(=Max(Year)-1)}>} [sales])
This works absolutely fine. Now I have added one expression to this. Here the ReportOn field is from an inline table which has no relation to the sales table.
if
if(ReportOn='Ledger',Sum({$<Year={$(=Max(Year)-1)}>} [Ledger sales]),Sum({$<Year={$(=Max(Year)-1)}>} [sales]))
This works only when I have not selected any date related filters in my report. If I select a date related filter (say 2009), only the first one works and second one doesn't refresh data. It always gives the [sales] column value.
Is there anything that I am missing in my expressions?
Regards,
Murali
(ReportOn='Ledger',Sum({$<Year={$(=Max(Year))}>} [Ledger sales]),Sum({$<Year={$(=Max(Year))}>} [sales]))Hi Murali,
Check your Year field. This is working fine with me see the attachment.
Shumail
Hi Shumail,
Thanks for the quick response. I have updated your qvw file with the problem I am facing. Attached is the updated date.
Please note when I select a year and change the 'Report On' value, in the graph, only the selected year values are updating not the year-1 value.
Is this the default functionality of QlikView?
Regards,
Murali
Hi All,
Could any one please help me with the above query.
I got struck with this and need to give an update on this ASAP.
If this is not possible using the existing table structure then please let me know.
Thanks in advance.
Regards,
Murali
Hi Murali,
I checked your document and it is displaying both selected and previous year data when I change the 'Report On' selection.
I could not identify the issue you mentioned. Can you elaborate in detail?
-Haneesh
Please check now, the graph was working fine. I put a data grid + in a graph value on data point + freeze the axis values.
Shumail
Hi Haneesh,
Thanks for your reply.
The issue comes when you select a particular year and then change the 'Report On'.
For example, if you select year '2008' in the year list, the graph will show 2008 and 2007 data(two bars). After this if you change 'Report On' value, the graph data refreshes only for 2008 (bar in the graph) but not 2007 (bar in the graph).
I hope I am clear this time.
Once again thanks in advance for your help.
Regards,
Murali
Hi Shumail,
Thanks for the reply.
The problem still exists. Please check my example below.
The data is
Year - Sales - Ledger Sales
2008-2200-2100
2007-1800-2000
When you select year '2008' in the list box and change report on to 'Ledger', the graph shows 2007 (1800) and 2008(2100). Here is the problem as 2007 is showing sales instead it should refresh to ledger sales.
Regards,
Murali
Hi Haneesh,
Please check in both cases 2007 value is 1800 only. But for ledger it has to be '2000' and for 'Non Ledger' it has to be '1800' when the year 2008 is selected in the list box.
Regards,
Murali