Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends,
I was practicing SUM function in QilkView. as I am a beginner I got failed. please help me out.
please go through the attachment. I have mentioned what output I want.
Thanks,
Hi,
Try below and see attached
//script
TMP:
LOAD *,
IF([Tax %] >0,1,0) AS [TaxFlag]
;
LOAD * INLINE [
Trx No., Description, Cost, Tax %, Tax Amount, Total
A001, Milk, 7.5, 5, 0.38,7.88
A001, Water, 2.95, 5, 0.15,3.1
A001, Egg, 25, 0, 0,25
];
//use straight table
//Dim = Trx No.
//Expr1 Label = Taxable Amount (Tax% = 5)
Expression = SUM({<TaxFlag = {1}>}Total)
// Expre2 Label = Non Taxable amount (Tax% = 0)
Expression = SUM({<TaxFlag = {0}>}Total)
//Expr3 Label = Tax
Expression = SUM({<TaxFlag = {1}>}[Tax Amount])
//Expr4 Label = Total
Expression = SUM(Total)
Hi,
Try below and see attached
//script
TMP:
LOAD *,
IF([Tax %] >0,1,0) AS [TaxFlag]
;
LOAD * INLINE [
Trx No., Description, Cost, Tax %, Tax Amount, Total
A001, Milk, 7.5, 5, 0.38,7.88
A001, Water, 2.95, 5, 0.15,3.1
A001, Egg, 25, 0, 0,25
];
//use straight table
//Dim = Trx No.
//Expr1 Label = Taxable Amount (Tax% = 5)
Expression = SUM({<TaxFlag = {1}>}Total)
// Expre2 Label = Non Taxable amount (Tax% = 0)
Expression = SUM({<TaxFlag = {0}>}Total)
//Expr3 Label = Tax
Expression = SUM({<TaxFlag = {1}>}[Tax Amount])
//Expr4 Label = Total
Expression = SUM(Total)
Thanks Friend. that's done.