Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have this, in the load script:
Working:
LOAD YRMON,
SEG,
Segment,
Segment2,
Manufacturer,
Brand,
FROM
(qvx);
Segments:
LOAD * INLINE
[ Segment, SortOrder
Small B Car, 1
Small Premium Utility, 15
Mid-Size Pickup, 21
Full-Size Pickup, 22
Med & Heavy, 23
];
and that works fine (i took out lines for this question) and this file, PM_only.qvx, is all data. I made two pivot tables from this data with expressions and that's working. now, if want to either load in another .pvx file where Segment2='O8500' or Segment2='U8500' ONLY (with the exact same field names) or use the above file, brought in, but i only want to see where this criteria is met (Segment2='O8500' or Segment2='U8500'), i tried making this for forcing the load order:
Seg2s:
LOAD * INLINE
[ Segment2, SortOrder
O8500, 1
U8500, 2
];
and when i reload the script, i get a loop condition and my initial pivot charts are reduced to just that criteria, not the full amount of data. How do I either load two different .pvx files in, and force a load order or force two load orders and a criteria, on the same data?
thanks
becki kain
May be as below:
Working:
LOAD
YRMON,
SEG,
Segment,
Segment2,
Manufacturer,
Brand,
'First Table' as Type
FROM
(qvx);
LOAD YRMON,
SEG,
Segment,
Segment2,
Manufacturer,
Brand,
'Second Table' as Type
FROM
(qvx)
Where
Segment2='O8500' or Segment2='U8500' ;
Segments:
LOAD * INLINE
[ Segment, SortOrder
Small B Car, 1
Small Premium Utility, 15
Mid-Size Pickup, 21
Full-Size Pickup, 22
Med & Heavy, 23
];
Now you can use the field 'Type' and get the data either from First table or the Second table.
II. The second option is:
Load the table only once and then use set analysis while calculating the expressions. for example:
Sum({<Segment2={'O8500','U8500'}>}Amount)
and use the below expression where you do not want to mention Segment2='O8500' or Segment2='U8500' :
Sum({<Segment2=>}Amount)
Hope this helps..
my question really is, can I do two load orders with the same data set, for 2 different pivot tables, using different fields for the ordering?
To avoid of loops you can try this?
Working:
LOAD YRMON,
SEG,
Segment,
Segment2,
Manufacturer,
Brand,
FROM
(qvx) Where Segment2='O8500' or Segment2='U8500';
Segments:
LOAD * INLINE [
Segment, SortOrder
Small B Car, 1
Small Premium Utility, 15
Mid-Size Pickup, 21
Full-Size Pickup, 22
Med & Heavy, 23
];
no, because I need all data, for the first pivot table but then a subset for the second pivot. I can do the second pivot by adding in [Segment2]={U,O} in set analysis but how do I force the order of the rows, in the second pivot? thanks
Not sure, I understand your issue. Will you provide sample data set and expected result
May be as below:
Working:
LOAD
YRMON,
SEG,
Segment,
Segment2,
Manufacturer,
Brand,
'First Table' as Type
FROM
(qvx);
LOAD YRMON,
SEG,
Segment,
Segment2,
Manufacturer,
Brand,
'Second Table' as Type
FROM
(qvx)
Where
Segment2='O8500' or Segment2='U8500' ;
Segments:
LOAD * INLINE
[ Segment, SortOrder
Small B Car, 1
Small Premium Utility, 15
Mid-Size Pickup, 21
Full-Size Pickup, 22
Med & Heavy, 23
];
Now you can use the field 'Type' and get the data either from First table or the Second table.
II. The second option is:
Load the table only once and then use set analysis while calculating the expressions. for example:
Sum({<Segment2={'O8500','U8500'}>}Amount)
and use the below expression where you do not want to mention Segment2='O8500' or Segment2='U8500' :
Sum({<Segment2=>}Amount)
Hope this helps..
I did this:
drop table Segments;
Seg2:
LOAD * INLINE
[ Segment2, SortOrder
Full-Size Pickup - U8500, 1
Full-Size Pickup - O8500, 2
];
to get around the loop and yes, i'll have to do really long set analsys to just pull in those two sub segments. thanks
and then i lose my load order for "Segments" when i do the drop