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

Using previous calculated value in pivot table

Hi everyone,

Please, help me solve such a task.

Have

ItemId BatchId Stock level AvgOutcome NumOfDays DayOutOfStock (today + num of days)

I1 1 100 25 4 23/04/2011

I1 2 150 25 6 need to 23/04/2011(previous value) +6 (current num of days) !

I use today() + NumOfDays formula.

Thanks in advance,

Cheers,

Michael

File in attachment[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0312.StockAnalysis.zip:550:0]

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Michael,

In both a straight or pivot table the following should work

=Above(Today() + NumOfDays) + DayOutOfStock


Hope that helps.

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hello Michael,

In both a straight or pivot table the following should work

=Above(Today() + NumOfDays) + DayOutOfStock


Hope that helps.

ulyxess1983
Contributor
Contributor
Author

Hi Miguel,

Thanks for answer.

Could you also tell me what formula to use if I have only NumOfDays and need to calculateDayOutOfStock for each following row?

Like this

Item1 Batch1 Stocklevel = 100 Avgoutcome = 50 NumOfDays = 2 Today()+2 = Date1

Item1 Batch1 StockLevel = 50 Avgoutcome = 50 NumOfDays = 1 - Either Today()+NumOfDays(prev) + NumOfDays(curr), or Date1 + NumOfdays(curr)

?

Maybe Above(today()+NumOfDays)+NumOfDays?

Miguel_Angel_Baeyens

Hello,

I'm getting a bit lost because I don't know where do you have that "Date1" field. But according to your expressions above

Today() + Above(NumOfDays) + NumOfDays


should work.

Hope that helps.