Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sathish_kumar
Contributor II
Contributor II

Show demand based on schedule changes for the week

Hello Qlik users,

I am planning to update the demand based on the schedule changes. My data has load and weekdayno but there is a schedule table where load gets updated in the output table based on the schedule

Schedule.JPG

stalwar1

Can you please try to reflect in the script based on the output sheet in the excel. I was able to do the first part for AB but for CD, we need to shift the demand from 5,6,7 to 2,3,4?

This is just a sample data. there will be many data points so hard coding of 2,3,4 should be not done. So i have added counter and then based on that we need to shift demand.

2 Replies
sunny_talwar

How do you determine the shift value? I mean CD went from 5, 6, 7 to 2, 3, 4.... what if we had 1, 2, 4 to 4, 5, 6... I mean how do we determine what value goes to what?

sathish_kumar
Contributor II
Contributor II
Author

We may need to create ascending order to map list. If CD goes from 5,6,7 to 2,3,4 then 5 to 2 and 6 to 3 and 7 to 4. If we have schedule 4,5,6 but data at 1,2,4 then 4 to1 and 5 to 2 and 6 to 4.

All these are applicable if number of weekdays are matching in the data. Suppose I have values for 1,2,3 but schedule is for 4,5,6,7 then for 1,2,3 is mapped for 4,5,6 but for extra day we just take average of 4,5,6 value or peek value of6

Thanks a lot stalwar1