Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a line chart with two expressions one for current year and the other for previous year with Month as dimension.
I want to show it in such a way that the expression should show the months only till latest month. i.e., if today's month is Nov 2018, it should show all the months of 2017 and Jan to Nov of 2018 and should not show December value as zero.
If I am activating suppress null values, all the zeroes/ months not having data between Nov 2018 and Jan 2018 are also disappearing. But I only want to suppress future values whose data ain't there not past values.
*Note: We can see only 2018 data as previous year (2017) data is not there yet.
Thanks in Advance
Ram
There is a way to achieve this, one should use the if condition with comparison of latest month end date (vLtstMnthEDt) defined as variable in front end(vMaxSalesDT) and maximum date available in backend. And use the following as expression:
=If($(vLtstMnthEDt)<=$(vMaxSalesDT), aggregation expression, null())
And suppress nulls in the expression presentation. This works.
Hi rammarthi,
Could you indicate what expression are you using in the graph?
regards
Hi,
I believe the issue is because there is a missing or zero value for a month, so when you visualize it on a chart there is no way a line can be drawn here for a row with missing or zero value so its better you see how the data looks like when you have the same dimension and expression is depicted in a straight table so that you get a fair idea on the data , also if you could provide the sample data , it would help in guiding further
Hi Rammarthi,
I created some sample values for testing my expression, I think below is what you want:
Aiolos Zhao
The expression for each of the years is something like this:
=Sum({<Filter1={1},Filter2={2},Sales_Dt={'>=$(=$(vCurrYrStDt))<=$(=$(vCurrYrEDt))'}>}Sales) for Current Year
=Sum({<Filter1={1},Filter2={2},Sales_Dt={'>=$(=$(vPrevYrStDt))<=$(=$(vPrevYrEDt))'}>}Sales) for Previous Year
Data Sample Attached for reference.
Again we need line chart to show zeros for April and May. And don't show the Dec 2018 at all assuming 2017 all the data is present.
Regards
Ram Marthi
What ever you are showing for April is good.
Lets assume today's month is Oct. So future Nov and Dec are also showing zeros they shouldn't be shown.
I just attached data sample for 2018 data please check.
Hi,
The sample Data provided does'nt have an entry for Months 4 and 5 which is April and May Months , also it lacks data for 2017 , so I have tweaked the Excel to have all these information included and created the chart, please check if it works.
So, all you need is to get the complete data say if there is no sales in any month the data must have an entry with a zero value for that month.In case the data cannot be prepared that way we will need to make changes in the Script to include the missing data with zero value in qlikview itself, as in the current state qlikview will otherwise not know that a value is missing and something needs to be done.
Hope this helps
I probably missed the attachment