Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Current month value im getting in next month and soon

HI Experts,

I have a bar chart with 1 Dimension and 4 Expression.For this 1 Dimension 3 Expression are showing proper count and 1 Expression is showing nexted Value.I mean to say Feb Value im getting in March  Month and March value in April Month etc..,

My Dimension is =MonthName( [PostingDate])

and 4 th expresson whicn im getting Nexted value is

=        SUM({<

                                EngagementBilling_End_Date__c={"<=$(=date(MonthEnd(AddMonths(vMaxWeekStartDate,1)),'DD MMM YYYY'))>=$(=Date(MonthName(vMaxWeekStartDate),'DD MMM YYYY'))"}

                                ,EngagementAuto_Roll_Clause__c={'NO'},EngagementEngActualProjectedFlag=

                                ,EngagementdtmAddedOn=,CalendarMonthAndYear=,CalendarMonthName=,FinancialYear=,LastandCurrentMonth=,SalesType=

                                >}EngagementEng_Amount_in_USD )

Please let me know where im doing mistake.(I wann show Feb and March value),but iM getting Feb Value in March and March value in April.

InAdvance,

Thank you

5 Replies
sunny_talwar

Hi Anil,

How are you defining your variable vMaxWeekStartDate?

What is it equals to?

Best,

S

Anonymous
Not applicable
Author

vMaxWeekStartDate =Date((MAX({1<CurrentDateFlag={1}>}PostingDate)))

CurrentDateFlag=if(NUM(Date(TempDate))<=NUM(Date(($(vDateToday)))),1,0) As CurrentDateFlag,

LET vDateToday = Num(Now()); 

Thanks for the promt response

sunny_talwar

Update: Adding an application for reference purposes.

From what I am seeing in the expression, it seems that EngagementBilling_End_Date__c will be <= Next Month's end date and >= Current's month start date.

For example

-> Date(MonthEnd(AddMonths(Today(), 1)), 'DD MMM YYYY') = 31 Mar 2015

-> Date(MonthName(Today()), 'DD MMM YYYY') = 01 Feb 2015

Is this what you are trying to do? or are you trying to sum between end of this month and beginning of the month?

->Date(MonthEnd(Today()), 'DD MMM YYYY') = 28 Feb 2015

-> Date(MonthName(Today()), 'DD MMM YYYY') = 01 Feb 2015


If later is correct, I would try using the following expression:


=SUM({<EngagementBilling_End_Date__c={"<=$(=Date(MonthEnd(vMaxWeekStartDate),'DD MMM YYYY'))>=$(=Date(MonthName(vMaxWeekStartDate),'DD MMM YYYY'))"}, EngagementAuto_Roll_Clause__c={'NO'},EngagementEngActualProjectedFlag=, EngagementdtmAddedOn=, CalendarMonthAndYear=, CalendarMonthName=, FinancialYear=, LastandCurrentMonth=, SalesType=>} EngagementEng_Amount_in_USD)


HTH


Best,

S



Anonymous
Not applicable
Author

Ys you are correct..wht is the next step?

sunny_talwar

Have you tried using the following expression?

=SUM({<EngagementBilling_End_Date__c={"<=$(=Date(MonthEnd(vMaxWeekStartDate),'DD MMM YYYY'))>=$(=Date(MonthName(vMaxWeekStartDate),'DD MMM YYYY'))"}, EngagementAuto_Roll_Clause__c={'NO'},EngagementEngActualProjectedFlag=, EngagementdtmAddedOn=, CalendarMonthAndYear=, CalendarMonthName=, FinancialYear=, LastandCurrentMonth=, SalesType=>} EngagementEng_Amount_in_USD)


If you did not try it, I would give the above expression a shot. If you did, but did not get the results you wanted, would you be able to tell what went wrong this time, so that we can further troubleshoot it.

Best,

S