Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
my goal is to load a "," delimited file ( see test file attached ) removing the first line "Summary" , reading the file then removing the "Daily Usage" section
It's possible?
Thank you
Enrico
Try this:
You could try something like this:
First 1 LOAD * FROM [..\Test_partial_read.csv]
(txt, utf8, embedded labels, delimiter is ',', header is 4 lines);
- Marcus
sample qvw is attached.
FindDailyUsage:
LOAD
rowno() as LineNo,
PartnerId
FROM
(txt, utf8, embedded labels, delimiter is ',', msq, header is 4 lines);
Temp:
load
LineNo
resident FindDailyUsage
where PartnerId = 'Daily Usage';
let vFirst = peek('LineNo');
drop Tables FindDailyUsage,Temp;
First $(vFirst)-1
LOAD
rowno() as LineNo,
PartnerId,
PartnerName,
PartnerBillableAccountId,
CustomerCompanyName,
MpnId,
InvoiceNumber,
ChargeStartDate,
ChargeEndDate,
SubscriptionId,
SubscriptionName,
SubscriptionDescription,
OrderId,
ServiceName,
ServiceType,
ResourceGuid,
ResourceName,
Region,
Sku,
DetailLineItemId,
ConsumedQuantity,
IncludedQuantity,
OverageQuantity,
ListPrice,
PretaxCharges,
TaxAmount,
PostTaxTotal,
Currency,
PretaxEffectiveRate,
PostTaxEffectiveRate,
ChargeType,
CustomerId,
DomainName
FROM
(txt, utf8, embedded labels, delimiter is ',', msq, header is 4 lines);
It works! Thank you!
But ...
There is a complication. This is a test file, but in production I' have a directory with a lot of similar file , with a section of "summary" that I'have to read and a section of "daily" that I' have not to read.
My goal is to read the files stored in the directory (all) and load in QlikView only the section "summary" of every file.
I' don't know the name of every file, only the directory.
To test, I attach 3 file
Thank's again
Enrico
Try this:
Great!
Thank you again
Enrico
Now, another question, if you can help me.
In the same test situation, my customer ask me to read the section "daily usage" to ceck the total value in the section "summary".
So I can show a section "detail" of the summary.
Thank you
Enrico