cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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_szsBBnYOSBkK0n0...

 

*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)

000.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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!

 

 

 

 

1 REPLY 1
Highlighted
Community Support
Community Support

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

@trdoan,

 

You may try using AVERAGEX and FILTER to add a measure.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors