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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
valerio347
Contributor
Contributor

WEIGHTED AVERAGE ON GRAPH CALCULATION

Good morning, 

 

I have a question regarding the visualization of a formula on a line graph:

 

the need is to see a weekly trend  of a KPI performance measured in days on three plants. The Kpis measures the stock time of lots.

Since the formula is measuring with weighted average on kilos I have a problem in visualize the single value of a week. 

 

Hereby the formula:

Sum(
Aggr({<NOM_SITE={'NAP'}>}
Sum((AGRO_DATE_RECEPTION-AGRO_DATE_RECOLTE))
*
Sum(QTE_MOUVEMENT)
/
Sum(TOTAL QTE_MOUVEMENT)
, NOM_SITE, LOT_NO
)
)

As you can see we are calculating a difference of two hours * lot quantity. So the calculation is averaged.

 

The output on the graph is like this:

clipboard_image_0.png

 

The problem is that the system is averaging the Kpi on the span of time selected (from week 27/2018 to week 2019/01) and not on the single week. To get to know the exact output of the KPI for a single week, I need to select the week one by one and write it down on a paper.

 

My question is: how can I change the formula in order to see the single weighted-average KPI on every week on the line graph? What formula should I try to use?

 

Many thanks in advance for your help

 

Regards

 

Valerio

Labels (1)
1 Reply
valerio347
Contributor
Contributor
Author

Hi all,

 

any news?