Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

hsm12345
New Contributor

script error

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);

5 Replies
MVP
MVP

script error

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,

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

isaiah82
Contributor III

script error

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

hsm12345
New Contributor

script error

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.

Not applicable

Re: script error

I think GroupBy clause and FORMID field information is missing.

Employee
Employee

Re: script error

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.

  1. QlikView Desktop client > Settings > Document Properties
  2. General tab
  3. Check "Generate Logfile"
  4. Reload the document

There will be a file named as the application but with .log as extension. Please  attach that to this thread.