Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
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))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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