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: 
Not applicable

Need help with getting MTD figures on a Chart Pivot table

VERY NEW to QLIKVIEW and haven't gotten to training yet...... Our Qlikview expert left the company and we are trying to get our first Dashboard up and running.

The DNOY calculation works just fine.  Although it’s for the entire year and not just MTD.

DNOY is a calculated field in the Sales Calendar files that is for the Number of the  Day in the Year a for DayEndDate  this for our  Invoice History file.

sum({<DNOY = {"<=$(=DayNumberOfYear(Today()))" },[Order Type] = {'O'},[Line Item Type] = {'I'}  >}[Total Line Amount])

My thinking  was to take the above and combine it with something similar to use in conjunction to get MTD figures.

However  the month calculation isn’t working  when I code the calculation by itself, so need to get that fixed before I can use it in the other calculation.

This is the documentation on how I’m trying to create the calc below is the list box where I was trying to verify data and see if I could get the calc right.

   sum({<SalesMonth = {"<=$(=Month(Today()))" },[Order Type] = {'O'},[Line Item Type] = {'I'}  >}[Total Line Amount])     THIS CALCULATION DOESN’T WORK

a field in our database SalesMonth this returns the value of Jul  

              month(Today())  this returns the value of  Jul

      sum({<DNOY = {"<=$(=DayNumberOfYear(Today()))" },[Order Type] = {'O'},[Line Item Type] = {'I'}  >}[Total Line Amount])    this Calculation works just fine BUT it’s for the entire year not just the MTD figures.

You can see from the list box below that Both SalesMonth and month(Today()) return the same value.

  SO MY thinking is that this next calculation should work when then  when months are both equal.   As it’s in the same format the other one and it works.

2 Replies
MayilVahanan

HI,

     Try like this,

For verify     :

sum({<SalesMonth = {"Jul"},[Order Type] = {'O'},[Line Item Type] = {'I'}  >}[Total Line Amount])

DO you have date field, if so, you can use like this:

=Sum({<DateField = {'>=$(=MonthStart(Date)) <=$(=MonthEnd(Date))'},[Order Type] = {'O'},[Line Item Type] = {'I'}  >}[Total Line Amount]) 

Hope it helps

,

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Lynda Wales

800 845-3711 ext. 2366

lyndawales@unitedsportingco.com<mailto:lyndawales@unitedsportingco.com>