Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
guillaume_gorli
Creator II
Creator II

Value M vs Value M-1 in a table chart

Dear all,

I need to show in a table chart :

  • inventory value of the current month in selection
  • inventory value of the previous month
  • Difference between M and M-1 inventory value


Thanks to some nice help, i have been able to show in a text object the inventory value of the provious month but as i am now trying to paste the formulas in a table chart, the value is shown but linked to the previous month...


let me show you :


For instance :


In october 2016 :


Inventory value is 1254

Inventory value of the previous month is 408 (september figure then)

Difference between M & M-1 is 846


Below is print screen of what i get : the text object is right but the data in the table chart is wrong




Capture.JPG

And this is what i am looking for :


Capture.JPG

Attached is .qvw and excel database for those who want to help


Thanks in advance


Guillaume

Labels (1)
26 Replies
sunny_talwar

May be change it to this

If(Len(Trim([Inventory value])) > 0, [Inventory value] - Sum(TOTAL{$<MonthYear = {"$(=Date(AddMonths(YearStart(Max(MonthYear)), -1), 'MMM YYYY'))"}, Mois, Année>}[Inventory Value]))

guillaume_gorli
Creator II
Creator II
Author

Does not seem to work :

Capture.JPG

sunny_talwar

Use this

[Inventory value] - Sum(TOTAL {$<MonthYear = {"$(=Date(AddMonths(YearStart(Max(MonthYear)), -1), 'MMM YYYY'))"}, Mois, Année>}[Inventory Value]) * Avg({$<MonthYear = {"$(='>=' & Date(YearStart(Max(MonthYear)), 'MMM YYYY') & '<=' & Date(Max(MonthYear), 'MMM YYYY'))"}, Mois, Année>} 1)

guillaume_gorli
Creator II
Creator II
Author

Wonderful.

Thanks Sunny

sunny_talwar

Great.... Since this thread has grown in responses, I would suggest you take some time to mark some helpful responses. The reason I ask this is because when other land on this thread, they might find themselves lost looking for answers, but marking some of the responses as helpful, you might be able to steer them to useful responses. You can mark as many helpful responses as you want, but make sure not to overdo... because overdoing defeats the purpose of marking anything helpful.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

guillaume_gorli
Creator II
Creator II
Author

Ok Sunny i will

sunny_talwar

Thank you