Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rammarthi
Creator
Creator

Line Chart with Month Dimension Future Values

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.

When I am suppress null all the April, May and Dec are vanishing. I dont want April and May with Zeros disappear, I only want Dec to disappear as data is only till Nov.When I am suppress null all the April, May and Dec are vanishing. I dont want April and May with Zeros disappear, I only want Dec to disappear as data is only till Nov.

*Note: We can see only 2018 data as previous year (2017) data is not there yet.

Thanks in Advance

Ram

Labels (2)
13 Replies
anushree1
Specialist II
Specialist II

So does that mean considering its Oct 2018 you do not want to see data for Nov and Dec for both the Years 2017 and 2018.

If That is the case , please check the attached file . I have here hardcoded the Month as Oct and written a calculated Dimension with Suppress when value is Null option checked in Dimension Tab to get the desired result.

Hope this helps, I only see the Excel as an attachment in your post

rammarthi
Creator
Creator
Author

Use this data in your qvw, you will find it wrong. Both the April, May and Dec should be in current year only not in two years. Data for yester years all the months is there and not zero.

anushree1
Specialist II
Specialist II

Hi,

I am not sure if we have got the problem right here, X axis is going to be a constant we cant have Apr May and Dec  appear for 1 measure and not appear for the other.

rammarthi
Creator
Creator
Author

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.