Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Diinkant
Contributor III
Contributor III

Line Chart

Hi,

I am trying to create a line chart which looks at the previous month sales and then forecasts for the current month. I have filter for Year and Month.

My dimension is Day([Order Date]) and my measure is Sum({<PeriodID = {'2808'}>} [Inclusive Amount Ordered]) which is Feb 2025.

Issue: once I filter by Year 2025 and Month Apr, the line chart goes blank, and I believe this is because of the dimension I am using where in theory there is no data. How do I work around this as every time i select a month, I will be looking at the previous month sales and then forecasting for the current month.

I thought I can do this using an analysis but doesn't seem like it.

Thanks

Labels (2)
1 Solution

Accepted Solutions
Diinkant
Contributor III
Contributor III
Author

Thanks for this response. The issue was that my calendar didn't scale properly therefor when I was writing my measure, the Days would be limited.

View solution in original post

2 Replies
Chanty4u
MVP
MVP

Try this 

Sum({<Year = {"$(=Max(Year))"}, Month = {"$(=Month(AddMonths(Max([Order Date]), -1)))"}>} [Inclusive Amount Ordered])

+

ForecastFormula

Diinkant
Contributor III
Contributor III
Author

Thanks for this response. The issue was that my calendar didn't scale properly therefor when I was writing my measure, the Days would be limited.