Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
i have a table which contains Name & Value like :
| NAME | VALUE |
| ALL_123_ABC_***_567 | 10 |
| ALL_1234_***_ABC_568 | 20 |
| ALL_1234_###_569 | 30 |
| ALL_1234_570 | 40 |
| ALL_1234_CD_###_571 | 50 |
| ABC_1234_***_572 | 60 |
Now i need to calculate the sum of value whose name should start with "ALL" and the Name must contain *** or ###.
Thanks in Advance
Regards
Roopesh
Attached has samples from load script, chart (calc dimension) and text box

sum(if(NAME like 'ALL*' and NAME like '*****' or NAME like '*###*', VALUE))
Attached has samples from load script, chart (calc dimension) and text box

Hi,
You can try this way also in the load script by adding two flags one for * and other for # symbols and load table and do sum in the front end.
Table1:
LOAD NAME,VALUE,if(Index(NAME,'***') = 0,0,1) as IndexString, if(WildMatch(NAME,'*###*'),1,0) as WildString;
LOAD * Inline
[
NAME, VALUE
ALL_123_ABC_***_567, 10
ALL_1234_***_ABC_568, 20
ALL_1234_###_569, 30
ALL_1234_570, 40
ALL_1234_CD_###_571, 50
ABC_1234_***_572, 60
];
Final:
LOAD
NAME,VALUE as Value
Resident Table1
Where (Left(NAME,3) = 'ALL' and IndexString = 1) or WildString = 1;
DROP Table Table1;

Regards
Anand