Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Table showing incorrect data

HI

The budget table showing incorrect data.

The correct data are as right table (Budget 2).

In addition, the budget should show the same data for all years - 2007, 2008, 2009, 2010.

"Budget" table comes from the budget  tab in the edit script

"Budget2" table comes from the budget2  tab in the edit script.

3 Replies

Re: Table showing incorrect data

Alon

I'd suggest you outer join your monthly budget table to a table of years.  Have a look at the sample script at the bottom of this reply.

[It would be a better data model it then you converted the Month & Year into a QV date field for MonthYear and then suitably join this onto your Date table]

Budget :

LOAD * INLINE [

    BudgetAmount, BudgetMonth

    234, Jan

    456, Feb

    43, Mar

    3434, Apr

    66, May

    34, Jun

    5, Jul

    65, Aug

    87, Sep

    99, Oct

    85, Nov

    44, Dec

];

Outer Join (Budget)

LOAD * INLINE [

    Year

    2007

    2008

    2009

    2010

    2011

    2012

    2013

];

Load

monthname(date#(Year & BudgetMonth, 'YYYYMMM')) as MonthYear ,

BudgetAmount

resident Budget

;

Best Regards,     Bill

Not applicable

Re: Table showing incorrect data

HI

Thanks for your response, but it does not work.

Maybe I need to change something in the date sheet or sales?

Anyway, what about the first part of my question?

Not applicable

Re: Table showing incorrect data

Your Budget-2 table is not linked to data model so you are not getting the right data. Please try to connect the Budget-2 data with data model.

Community Browser