Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
There is this field called schedule that has things like XXXXX in it. I need to find a way to read in what this really means in terms of the days so example here is what they would mean:
XXXXX = MTWRF
X X X = MWF
X X = TR
and so on as it could be any mix of days. I am trying to find a ways to know what all these days are because the end game of this is to see what the days are and match that with the days that they have data for and make sure they have data for the days that they are scheduled to have data. But I just don't know how change over in qlikview what the X's really mean.
Any ideas? Nothing I try seems to work.
Depends on what format you need the final data. To get each value in a separate field like:
Monday | Tuesday | Wednesday | Thursday | Friday |
---|---|---|---|---|
X | X | X | X | X |
X | X | X | ||
X | X |
you could use
LOAD
mid(schedule, 1, 1) as Monday,
mid(schedule, 2, 1) as Tuesday,
mid(schedule, 3, 1) as Wednesday,
mid(schedule, 4, 1) as Thursday,
mid(schedule, 5, 1) as Friday
RESIDENT Table1;
Do you have some sample data you can share? Not really understand what and how we are trying to decipher
Depends on what format you need the final data. To get each value in a separate field like:
Monday | Tuesday | Wednesday | Thursday | Friday |
---|---|---|---|---|
X | X | X | X | X |
X | X | X | ||
X | X |
you could use
LOAD
mid(schedule, 1, 1) as Monday,
mid(schedule, 2, 1) as Tuesday,
mid(schedule, 3, 1) as Wednesday,
mid(schedule, 4, 1) as Thursday,
mid(schedule, 5, 1) as Friday
RESIDENT Table1;
ACTIVE | Date | SCHEDULE | STORE |
N | 10/12/2012 | XXXXX | 100 |
N | 2/12/2014 | XXXXX | 200 |
N | 8/2/2010 | XXXXX | 400 |
N | 6/27/2011 | XXXXX | 300 |
N | 6/27/2011 | X | 500 |
N | 6/27/2011 | XXXXX | 800 |
N | 6/27/2011 | XXXXX | 806 |
N | 9/21/2015 | 632 | |
N | 8/27/2015 | 631 | |
N | 11/12/2015 | 636 | |
N | 11/12/2015 | 487 | |
N | 11/12/2015 | 320 | |
N | 11/12/2015 | 321 | |
N | 11/12/2015 | 510 | |
N | 11/12/2015 | 553 | |
N | 11/12/2015 | 590 | |
N | 11/12/2015 | XXXXX | 613 |
N | 11/12/2015 | 866 | |
N | 2/9/2016 | XXXXX | 618 |
Thanks that worked!