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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Calculate and carry forward a value in a Month over Months where there is no Activity

Hi All

Im hoping if anyone can help....

I currently have a Line chart where the dimensionsare: Cyclic Group (Month, Quarter, Year) and FactoryRisks (6 different FactoryRisks) and the Expression is:

=COUNT(DISTINCT(IF(AGGR(MAX(Date), FactoryCode) = Date, FactoryCode)))

What I now want to display is the FactoryRisks trends over time running through all months with the latest date, so for example: If there was a countfor a FactoryRisk in Jan = count of 10, March = count of 7 and then nothing in April or May (which currently shows a blank) and then there is a trend in June =15, I want to be able to show last value so April and May would both have the value of 7 instead of showing just a blank.

How do I create the expression to achieve this?

Much appreciated for a solution as im struggling with this one.

1 Reply
tresesco
MVP
MVP

Better to handle this in the script. Use Peek() function to populate the missing data from the historical data. For details have a look here