Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Key and calculated field

HI,

I need to make a comparison between the actual sales and the sales budget.

in the Budget tab I createda calculated field:    Month(budgetMont) as Budget_Month it dosnt work from some rason.

And the second field I created is key field : BudgetYear&'-'&Budget_Month&'-'&CategoryID as KeyCompare .

The goal is to link the budget table and the sales table.-

In Sales tab I created:  Year&'-'&Month&'-'&CategoryID as KeyCompare

I created twice, once in sales table and once in SalesHistoty table.

What is the problem? whay it dosnt work?

Also, how can I create a calculated field  in sales tab?

Example: QTY * COST

7 Replies
Employee
Employee

Re: Key and calculated field

1) Month(budgetMont) as Budget_Month,  Month function requires a date, you´re using a string "Jan", "Feb"

2) BudgetYear&'-'&Budget_Month&'-'&CategoryID I´d like to see you data Budget.xls

3) Year&'-'&Month&'-'&CategoryID as KeyCompare, I don´t see a field called Month and Year, maybe you´re talking about Month(Date), Year(Date)

Employee
Employee

Re: Key and calculated field

QTY * COST, you can calculate after the "left join"


Left join (Sales)

LOAD

ProductID,

Date,

QTY * COST as AFieldName

resident Sales

Not applicable

Re: Key and calculated field

Thanks for your response.

Can you attach your answer with a QVD FILE?

Employee
Employee

Re: Key and calculated field

It would be easier if you send me sample of your data

Not applicable

Re: Key and calculated field

You mean I'll send you the Excel files?

There is an option to send it in private message?

Employee
Employee

Re: Key and calculated field

yes, send to clever@clever.com.br

Not applicable

Re: Key and calculated field

I sent you an email