Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Eliminate particular value in script

i have the account number like 1,2,,3,4,5,6,7,8,9 and its sales values

i want to eliminate the account number 1st and its sales in script level (Edit script) only.

9 Replies
settu_periasamy
Master III
Master III

Hi,

Try Like

Load Your Fields,

From

Source

where AccountNumber <>1;

Anonymous
Not applicable

Hi,

but the account number is Always 1?

Or do you want do discard the first record?

Order you the record per Account Number?

sunny_talwar

In addition if you have other tables which have are explicitly or implicitly joining to your fact table, you can use Left Join or Left Keep, respectively to remove any rows of data which corresponds to account number 1.

Kushal_Chawda

try,

Load *

From Table

where not wildmatch(AccountNumber ,'1*');

Not applicable

Hi,

Try this,

Load FeildName

from TableName

WHERE not match(FeildName,'1');

Best Regards,

Bhavesh

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Stephen,

You can do it by creating a variable in script in which you can define what is your Acount Number you wish to eliminate. In your case the account number is 1. You can also change this variable by using a input box in your dashboard.

Set vAccount = 1;


[Your Table]

LOAD *,

FROM ("Source Goes here")

WHERE [account number] <> $(vAccount);


Hope it helped you . Have a great weekend.


Regards,

MB


jagan
Luminary Alumni
Luminary Alumni

Hi,

If you want to eliminate account number simply you can use where condition to filter those records like below

Data:

Load *

From DataSource

WHERE AccountNumber <>1;

Hope this helps you.

Regards,

jagan.

ashwanin
Specialist
Specialist

Hi Stephen,

Simple way to remove a specific account from a number of a/c numbers is :

Load

AccountNumber,

Sales

from abc*xls Where AccountNumber <> '1' ;

maxgro
MVP
MVP

if you have a dimension table with your account you can first load that table

Dim:

load

     AccountNum,

     AccountDesc,

     .......

from ....

     where .... <> 1;



and then load your fact (sales) table 

Sales:

load

     ....

from

     ......

where Exists(AccountNum);