Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
one of the fileld in my list box has two names in list box so i wantt two names to be treat asone.
suppose i have table
apple
banana
apple1
now i want that apple 1 and apple comes underr single category.
For your script it would not work properly because you use wrong field you have to use [Sub-Head] other wise the same script you can use in another resident table.
////////////////////
Head,
[Sub-Head] as subhead,
//System,
//Equipment,
//QTY,
[Total Time(min)]as TOtaltime_MECH,
[PM Duration Time (min)],
If(Match([Sub-Head],'MECHANICAL'),'Mechanical',[Sub-Head]) as NewField,
[Breakdown Time (min)] as BRK_MECH,
//Others,
[Response Time (min)],
[Serviceability (%)] as service1,
[Availability (%)]as avail1
//Remarks,
//N
from
table1;
////////////////////////
Or
Temp:
Load
Head,
[Sub-Head] as subhead,
//System,
//Equipment,
//QTY,
[Total Time(min)]as TOtaltime_MECH,
[PM Duration Time (min)],
[Breakdown Time (min)] as BRK_MECH,
//Others,
[Response Time (min)],
[Serviceability (%)] as service1,
[Availability (%)]as avail1
//Remarks,
//N
from table1;
Noconcatenate
Final:
Load
*, If(Match(subhead,'MECHANICAL'),'Mechanical',subhead) as NewField
Resident Temp;
Drop Table Temp;
if(fieldname='apple1','apple',fieldname) into your list box expression.
you can
- use an expression in your listbox
=if(yourfruitfield='apple1','apple',yourfruitfield)
- do the same thing in your load script
load
.....
if(yourfruitfield='apple1','apple',yourfruitfield) as yourfruitfield
....
from
....
Write like
=If(Match(ListField,'apple1'),'apple',List)
Or
In Load Script
If(Match(ListField,'apple1'),'apple',List) as NewField
Or
=If(ListField,'apple1','apple',List)
Or
In Load
If(ListField,'apple1','apple',List) as NewField
if (wildmatch(fieldname,'apple *','apple',Fieldname)
it will workd for all upper, lower and capitalize cases
and also it will seach for all occurance start with apple or apple itself.
this is very useful i believe
its not working
where should i exactly write this script in load statement and instead of list wat should i give?
In list box expression write like
=If(Match(YourListField,'apple1'),'apple',List)
Or in load Script add new field
Load
If(Match(ListField,'apple1'),'apple',List) as NewField
From Location;
See the snap
why not check my post. i have attched example
hope this helps
Hi Yogita,
You can do this from script also. Use applymap function.
Map_Tab:
Mapping Load * Inline
[
Val, Reqd
apple1, Apple
Apple1, Apple
GreenApple, Apple
];
Now in your fact table use
applymap(Map_Tab,'Yourfield_Fruit','Val') as New_Fruit
In this way you won't get apple1 in your dashboard at all. You will get apple only and other measure as per apple(which is now apple1 or Apple1 or GreenApple etc)
Thanks & Regards
Suhas Gupta
sorry but i want to change in backend ....
Head,
[Sub-Head] as subhead,
//System,
//Equipment,
//QTY,
[Total Time(min)]as TOtaltime_MECH,
[PM Duration Time (min)],
If(Match(subhead,'MECHANICAL'),'Mechanical',table1) as NewField,
[Breakdown Time (min)] as BRK_MECH,
//Others,
[Response Time (min)],
[Serviceability (%)] as service1,
[Availability (%)]as avail1 ,
//Remarks,
//N
from
table1;
just see in subhead field there are two type APPLE and apple but i want to plot it as one APPLE .so how should i do