Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

Latest Daily/Month Production against Previous Day/Month

Good day everyone,

I have a set of data that captures production in daily and month interval.

I would love to visualize the data showing latest( current) day production vs previous date productions as well as current month vs previous month.

Sample data ( current month vs previous month)

YearMonthStationFigure (Kg)
2010JanuaryEdo56,000
Delta67,000
FebruaryEdo78,000
Delta69,000

Sample Data (cuurent day vs previous day)

DateEdoDeltaLagos
2013/09/293050100
2013/09/306025150

Thanks

12 Replies
akpofureenughwu
Creator III
Creator III
Author

Good morning sir,

I  tried the script you suggested yesterday it didn't give me the desired result (see attached)

Here is the script

LIB CONNECT TO 'Planning';

LOAD *,

if( Isnum(Date), 'Q')& Ceil(Month(Date)/3) as Quarter;

LOAD *,

    

    Date(Date#(Year&Month, 'YYYYMMMM')) as Date;

LOAD if(Len(Trim("Year")) = 0, Peek ("Year"), "Year") as "Year",

    if(Len(Trim("Month")) = 0, Peek ("Month"), "Month") as "Month",

    "Field",

    Figures;

SQL SELECT "Year",

    "Month",

    "Field",

    Figures

FROM " Planning".dbo.Planning;

I would love to compare the current month vs previous month for each field ( there are like three fields)

Regards 

sunny_talwar

Which expression are you trying? Current Month or Previous Month? Also, are you making selections in Month or Year field?

akpofureenughwu
Creator III
Creator III
Author

I'm trying the current month vs previous month....

I am making selection in date field since the date field is the combination of both month and year field..

Regards