Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month to Date analysis for user defined date

hi everyone

I  am trying to get month to date analysis using a date which is given by the user.

I loaded inline table for year,month and day so that there is no connection between the inline loads and the data in the data model

and created variables to hold the date selected by the user like

vselecteddate=makedate(Year,Month,Day)

vmonthstart=monthstart(vselecteddate)

so that when a user select the date from the inline load it gets stored in the variables and i used the variables in the set analysis

=Sum ({<ORDERED_DATE={">= $(=vyearstart) <= $(=vselecteddate)"}>}UNIT_SELLING_PRICE)

so i need to get data of the ordered dates between the vselecteddate and vmonthstart but i could not get any data

can anyone help me with this issue and if there is other way of doing it can you please post that.

please find the attachment

Thank you.

bhavya

6 Replies
Not applicable
Author

Hi,

Can you base your date variable off of your calendar so they're linked to the model? See attached example, I think it will help you. It's from Rob Wunderlich's cookbook, which you can download here:

Downloads - Rob Wunderlich Qlikview Consulting

See example EnterDateFromTo, or check the attached qvw.

Matt

Not applicable
Author

hi matthew

using the date in calender gives only dates related to the ordered date so i used the inline loads so that i can get all the dates.

thank you

bhavya

Not applicable
Author

Hi,

See attached example. I created a master calendar for you so that you don't have any missing date values. Then I linked the Start and End date variables to the master calendar.

Hopefully this will work for you. Please review and let me know.

Matt

Not applicable
Author

Hi Bhavya,

Were you able to implement this solution?

Matt

Not applicable
Author

Hello Matthew,

I apologize  for the late reply, i got the solution but using this expression bellow

YTD 

= Sum({$<INVOICE_DATE_1 = {'>=$(present_start)<=$(present_current)'},Year=>} AP_INVOICES_ALL.INVOICE_AMOUNT)


Thank you,

Bhavya

Not applicable
Author

ekkada meeru  work chesthunnaru