Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
med:
Load *,
If(FORMID = 'H' AND LOS > 1 , Total) as IH_Total,
If(FORMID = 'H' AND LOS = ' ', Total) as OH_Total,
If(FORMID = 'P', Total) as P_Total,
If(FORMID = 'N', Total) as N_Total,
sum(Total) as SumMedTotal;LOAD
MEM#,
//MEM# & FORMID AS MEDFORMMED,
//MEM# as Med_MEM#,
//MEM# as Medd,
ENCOUNTER#,
'3rd Quarter 2011' as Period, //Create a column calls period and populate it with the 3rd text //
'261740' AS MM,
'1.26' AS ACG,
[VEND NAM],
[TAX ID],
[TOTAL PAID] as Total,
SERVICE,
DISCHARGE,
LOS,
[ICD9 DIAG],
[FORM TYPE],
//IF([FORM TYPE]='HCFA 1450','H',If([FORM TYPE]='HCFA 1500','P',If([FORM TYPE]='NARRATIVE',' ','N'))) AS FORMID_MED,
IF([FORM TYPE]='HCFA 1450','H',If([FORM TYPE]='HCFA 1500','P',If([FORM TYPE]='NARRATIVE',' ','N'))) AS FORMID
FROM
Data\Dimensions\med.qvd
(qvd);
Hi,
Can you please elaborate on the error you are experiencing and what are you trying to get?
At a first glance, it seems you are using an aggregation function Sum() without the corresponding GROUP BY clause.
Regards,
BI Consultant
Immediately I see that you have an aggregate function: sum(Total) in your load statement but no GROUP BY clause. Please be sure and post some additional information (e.g. what error message are you getting, when, etc. and your specific question when posting to the forum.
Thanks -Isaiah
SumMedTotal,
LOAD
MEM#,
ENCOUNTER#,
'3rd Quarter 2011' as Period,
'261740' AS MM,
'1.26' AS ACG,
[VEND NAM],
[TAX ID],
[TOTAL PAID] as Total,
SERVICE,
DISCHARGE,
LOS,
[ICD9 DIAG],
[FORM TYPE],
IF([FORM TYPE]='HCFA 1450','H',If([FORM TYPE]='HCFA 1500','P',If([FORM TYPE]='NARRATIVE',' ','N'))) AS FORMID
FROM
Data\Dimensions\med.qvd
(qvd)
Above is the script error. It does not specified any other error except script error.
Thanks.
I think GroupBy clause and FORMID field information is missing.
In this example you have a comma on the first line, which is a syntax error. I suspect that this is not exactly the script you execute.
My suggestion is that you enable document log in your application, then reload once with the error and provide a copy of the document log.
There will be a file named as the application but with .log as extension. Please attach that to this thread.