Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
151562
Contributor II
Contributor II

fetch the last values if they don't exist in the month

As you can see in the example, the month of October has no value, so it doesn't appear in the table.

151562_0-1675942800381.png

What I want is for the month of october to have the value of the month of september.

In other words, I want all the months of the year and when they don't exist they get the previous value
How can I do this?
thank you in advance.

 

Update: 

I created a calendar to have the months null and I tried to use the above function but it only fetches the last value from the table.
I also tried using the peek function but it's not working
My condition in the script is as follows:
if(IsNull(Value) or Value=0,peek(Value),Value)
In the table I am aggregating by month when I use above:
sum(aggr(if(IsNull(sum(Value)) or sum(Value)=0,above(sum(Value)),sum(Value)),Mes))

151562_0-1676545388892.png

 

Thank you,
FPS
Labels (2)
0 Replies