Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
MK9885
Master II
Master II

Multiple if in backend script

Hi,

I have a table which has values below 

  • 10 – Full Range
  • 9 – All Week (0,1,2,3,4,5,6)
  • 8 – Weekend (0,6)
  • 7 – Week Day (1,2,3,4,5)
  • 6 – Saturday
  • 5 – Friday
  • 4 – Thursday
  • 3 – Wednesday
  • 2 – Tuesday
  • 1 – Monday
  • 0 - Sunday

If it is 1,2,3,4,5 then it should be considered as 7 and also 1 should be 1, 2 should be 2 etc..
If it is 0,6 then it should be 8 & also 0 should be 0 & 1 should be 1

I hope you get it?

These are day of week but not really tied to Date field. this is just a user input field.

Number 7 for them is a weekday, 8 is weekend, 9 is all week & 10 is Full Range (can be disregarded) but I'd need help with 7,8 &9.
Tried multiple if, match or pick match. nothing works on so many variables for if. Even Apply map doesn't.

any help is appreciated. this is quite important and urgent.
If you need a sample data, I can provide some sample data with full explaination.

Thanks.

Labels (1)
1 Solution

Accepted Solutions
MK9885
Master II
Master II
Author

@marcus_sommer 
I used the solution from our community answer.
sub string for apply map to get one to many mapping. It worked.

https://community.qlik.com/t5/QlikView-App-Dev/Applymap-in-1-many-situation/m-p/811352

 

Thanks for your help!

View solution in original post

2 Replies
marcus_sommer

I think what you are looking for is The As-Of Table - Qlik Community - 1466130.

- Marcus 

MK9885
Master II
Master II
Author

@marcus_sommer 
I used the solution from our community answer.
sub string for apply map to get one to many mapping. It worked.

https://community.qlik.com/t5/QlikView-App-Dev/Applymap-in-1-many-situation/m-p/811352

 

Thanks for your help!