Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

PRice Index

I'm trying to develop a dynamic monthly price index chart. the basic expression would be:

sum( current average unit price / last year average unit price * spend / total spend)

=



sum( [Unit Price (USD)] / [2009_AUP] * [Spend Value (USD)] / sum (TOTAL $<MonthYear> [Spend Value (USD)]))

I keep getting no data or memory allocation errors... any ideas?

1 Solution

Accepted Solutions
Not applicable
Author

I think I may have answered my own question for once! Here's the formula that appears to give me the desired result:

=AGGR(sum( [Unit Price]/ [2008 AUP] * [Total Spend] / aggr(NODISTINCT sum([Unit Price] * Quantity),Month)),Month)

Gives me a monthly index of price change when comparing receipts to the previous years average unit price (calculated in the script) by part. Awesome! I also am able to obtain an annual total, though not in the same object. but, I'm cool wit dat.

View solution in original post

4 Replies
Not applicable
Author

Hi,

Could you attach an example data file?.

Best regards.

Not applicable
Author

I've attached my latest attempt in QV. Hopefully this makes sense. Below is how I've developed my calcs. I want to get to the "120% Weighted Index" figure below plotted in a monthly graph with the ability to filter and drill down by materials, plants, material classifications. So the calculations need to be done on the fly, but, ultimately need to be done at the Material & plant level.

Base AUPAUP2QTYINDEXWEIGHTED INDEX
51520%1%
441100%4%
330
333100%9%
53260%4%
43575%11%
54580%16%
134300%36%
53560%9%
125200%20%
131300%9%
210
SPEND TOTAL99
120%Weighted index


Not applicable
Author

Okay, here's another example. I've been able to get the annual total to work out properly, however, I want to see the same analysis in the monthly figures. In other words, if the year over year change is 80% (reduction of 20%), what was it in January. January should be something like 102%, February 70%, etc... see attached. example. Instead, I'm seeing the monthly percent of the total annual percent. ???

Month Year =AGGR(sum( [Unit Price]/ [2008 AUP] * [Total Spend] / sum(TOTAL [Unit Price] * Quantity)),Month)
77.92%
1200922.33%
220096.17%
3200914.88%
420094.81%
520095.62%
620094.81%
720095.17%
820095.97%
920093.84%
1020094.32%


Not applicable
Author

I think I may have answered my own question for once! Here's the formula that appears to give me the desired result:

=AGGR(sum( [Unit Price]/ [2008 AUP] * [Total Spend] / aggr(NODISTINCT sum([Unit Price] * Quantity),Month)),Month)

Gives me a monthly index of price change when comparing receipts to the previous years average unit price (calculated in the script) by part. Awesome! I also am able to obtain an annual total, though not in the same object. but, I'm cool wit dat.