Forum Discussion

trdoan's avatar
trdoan
Helper III
7 years ago

IF statement + Calculated column to calculate average quantity from a different table

Hi everyone,

 

Here is my sample data: 

https://liveconcordia-my.sharepoint.com/:x:/g/personal/t_oa_live_concordia_ca/EZvVii_szsBBnYOSBkK0n0YBO4K3RmnaLmAMCkInhb-e6w?e=765Txe

 

*Note: The 3rd sheet (Average Quantity) was manually calculated for demonstration purpose only and is not part of my real data

 

"Compare Data" table:

VendorIDModelThreshold

 

"Full Data" table:

Vendor NameProduct IDPosting DateOrder
Quantity
Net Oder QuantityEngine ModelFinal Run Time

 

1. Can anyone please let me know how I can create a calculated column to calculate Monthly Average Quantity of each product ID in the "Compare Data" table using "Order Quantity" column from the "Full Data" table?

 

Something like this (please ignore the highlighted cells for now)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then, with the calculated column "Average Quantiy", how can I get these averages to automatically compare themselves to their corresponding threhold values from 'Compare Data'[Threshold] and if Average > Threshold, return "Over", otherwise return blank?

 

My overall aim is show visually only those Product IDs from the 'Compare Data'[ID] that have Average Quantity/month larger than their set threholds. I don't know if that is the right approach to my problem.

 

How would you approach this problem and what kind of visual do you recommend using?

 

Can anyone please advise? Thank you very much!