Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sivasiri99
Contributor III
Contributor III

Set analysis for three month in bar chart

Hi All,

In bar chart i need to show three month's data

If for a perticula data data is not present in previous month it should pic max date data of the month month

Thanks in advance.

Regards

Sivaram

1 Solution

Accepted Solutions
sunny_talwar

This should do it now

RangeSum(

Sum({<RECEIVE_DATE={"$(=Date(Max(RECEIVE_DATE)))"}>}TTL_GL_ACCOUNT),

If(Sum(TOTAL {<RECEIVE_DATE={"$(=Date(AddMonths(Max(RECEIVE_DATE), -1)))"}>}TTL_GL_ACCOUNT) = 0, Sum({<RECEIVE_DATE={"$(=Date(MonthEnd(Max(RECEIVE_DATE), -1)))"}>}TTL_GL_ACCOUNT), Sum({<RECEIVE_DATE={"$(=Date(AddMonths(Max(RECEIVE_DATE), -1)))"}>}TTL_GL_ACCOUNT)),

If(Sum(TOTAL {<RECEIVE_DATE={"$(=Date(AddMonths(Max(RECEIVE_DATE), -2)))"}>}TTL_GL_ACCOUNT) = 0, Sum({<RECEIVE_DATE={"$(=Date(MonthEnd(Max(RECEIVE_DATE), -2)))"}>}TTL_GL_ACCOUNT), Sum({<RECEIVE_DATE={"$(=Date(AddMonths(Max(RECEIVE_DATE), -2)))"}>}TTL_GL_ACCOUNT)))

View solution in original post

17 Replies
sushil353
Master II
Master II

Hi,

Please share sample application

sivasiri99
Contributor III
Contributor III
Author

Hi Sushil Kumar,

Thank's for quick response

pfa..

sivasiri99
Contributor III
Contributor III
Author

In that example:

If i select 10/31/2016 i should get 8/31/2016 9/31/2016 is not there in the data i should get max date of 9th month data

any have i should show three month data in the bar chart.

PrashantSangle

Hi,

Set anlaysis like

sum({<RECEIVE_DATE={">=$(=Date(AddMonths(max(RECEIVE_DATE),-2)))<=$(=Date(max(RECEIVED_DATE)))"}>}TTL_GL_ACCOUNT)

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Anil_Babu_Samineni

May be this?

if(RECEIVE_DATE='31/12/2016',Sum({<RECEIVE_DATE = {'>=$(=Month(RECEIVE_DATE,-2)) <= $(Max(Month(RECEIVE_DATE)))'}>}TTL_GL_ACCOUNT))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sivasiri99
Contributor III
Contributor III
Author

Hi Prashant,

I need to show only three bar in chat

ie..10/31/2016 & 8/31/2016  and 9/31/2016(9/31/2016) is not there in data it should pick max date ie 9/30/2016

this is what i need

sivasiri99
Contributor III
Contributor III
Author

Hi Anil,

You are hard coding 31/12/2016 but i need to pick based on selection of receive date list box

the bar chart should show three month's data based on pick of receiveing data it should behave dear.

sivasiri99
Contributor III
Contributor III
Author

Hi Prashant,

In my test.qvw if we select 26/10/2016 it is showing 3 months data

what my sinario is it should comare based on selection of receving date same day is not present in last month it should pick max day of month value ie..30/9/2016 if i select 31/10/2016

sunny_talwar

May be this:

Sum({<RECEIVE_DATE={"$(=Date(Max(RECEIVE_DATE)))", "$(=Date(MonthEnd(Max(RECEIVE_DATE), -1)))", "$(=Date(MonthEnd(Max(RECEIVE_DATE), -2)))"}>}TTL_GL_ACCOUNT)


Capture.PNG