Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
trdoan
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
v-chuncz-msft
Community Support
Community Support

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.