Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to get this line to work in a load statement for a new table.
PerformanceData:
Load
[TestId],
IF ([Site Type] ='ICMP', ([Mean Frame Loss]*2) AS [Mean Packet Loss], [Mean Frame Loss] AS [Mean Packet Loss])
Resident [TestData]
The fields are in two tables:
Site:
Load
[TestId]
[Site Type],
FROM [Combo.qvd] (QVD)
;
TestData:
Load
[TestId],
[Mean Frame Loss],
FROM [Combo.qvd] (QVD)
;
So if the Site Type is ICMP, then the Mean Frame Loss should be doubled and put into the Mean Packet Loss Field, otherwise the Mean Frame loss should be put into the Mean packet loss field unchanged.
May be like this:
MappingTable:
Mapping
LOAD [TestId]
[Site Type]
Resident Site;
PerformanceData:
LOAD [TestId],
If(ApplyMap('MappingTable', [TestId]) = 'ICMP', ([Mean Frame Loss]*2), [Mean Frame Loss]) as [Mean Packet Loss])
Resident [TestData];
May be like this:
MappingTable:
Mapping
LOAD [TestId]
[Site Type]
Resident Site;
PerformanceData:
LOAD [TestId],
If(ApplyMap('MappingTable', [TestId]) = 'ICMP', ([Mean Frame Loss]*2), [Mean Frame Loss]) as [Mean Packet Loss])
Resident [TestData];
You'll have to join the tables first if you want to do a calculation using fields from both tables. You join the tables and then calculate the result in the new joined table.
Thanks again, worked a treat.
Thanks, Sunny's solution worked without me having to do a table join so I didn't try this.