Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
sunny_talwar

Are you running into an issue? I wasn't sure what the problem is by reading your post?

akpofureenughwu
Creator III
Creator III
Author

Hello sunny... Thanks for your response

My challenge is how to approach it.. (write the script)

I could use the point in time reporting/ set analysis approach but I don't know if you have a better approach

thanks 

sunny_talwar

I like this

The As-Of Table

Have you already considered this?

akpofureenughwu
Creator III
Creator III
Author

Thanks I just looked at the blog you linked.. The 'as of month' approach is not quite giving me my desired approach.

Look at it this way... ( Saw this in a book 'Qlikview 11 for developers' written by M. Garcia, Barry Harmsen  )

To embed actual calculations into the field value definition in a set expression, we use the Dollar Sign Expansion (DSE) syntax. The final expression would be as follows:

Sum({$<Year = {$(=Max(Year))}>} [# Departures Performed])

If we want to get the record set corresponding to the previous year to whatever year the user selects, we would use:

Sum({$<Year = {$(=Max(Year)-1)}>} [# Departures Performed])

In the expression above, they were able to compare present year  figures  with previous year figures

I need to do such for present day vs previous day as well as present month vs previous month

Thanks

sunny_talwar

Is date or month one of the dimensions in the chart you are wanting to compare the two?

akpofureenughwu
Creator III
Creator III
Author

Yes..

My desired design is to use two gauges ( on showing present value) and the other (showing previous month/day value)

Regards

sunny_talwar

So there is no dimension then? You can use set analysis in that case....

Previous Day

Sum({<Date = {"$(=Date(Max(Date) - 1))"}>} Measure)

Previous Month

Sum({<Date = {"$(='>=' & Date(MonthStart(Max(Date), -1)) & '<' & Date(MonthStart(Max(Date))))"}>} Measure)

akpofureenughwu
Creator III
Creator III
Author

Alright sir

And I guess the current day is

Sum({<Date = {"$(=Date(Max(Date) ))"}>} Measure)


and


current month


Sum({<Date = {"$(='>=' & Date(MonthStart(Max(Date), )) & '<' & Date(MonthStart(Max(Date))))"}>} Measure)


right?

sunny_talwar

Current month would be something like this

Sum({<Date = {"$(='>=' & Date(MonthStart(Max(Date), 0)) & '<' & Date(MonthStart(Max(Date), 1)))"}>} Measure)