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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
EdwardChurches
Frequent Visitor

Filter Date Table (by dates in another table and production line)

Hi everyone,

 

I'm struggling with a formula to create the average quantity produced in a production line. I started with this formula to count the days the we actually worked:

 

countrows(calculatetable(dDate,filter(dDate,dDate[Day Of Week]<>"domingo"&&dDate[Date]<=lastdate(all(fProduction[Producción])))))

 

The formula works fine; it basically takes away Sundays. Here's the problem. I just got a new table with dates that should be taken away from the average (the dates are different depending on the production line).

 

I have no idea how to do this. Any suggestions?

 

(Hope I was able to explain my issue clearly)

 

 

1 REPLY 1
amitchandak
Super User
Super User

@EdwardChurches , Assume Your measure name is M1, which you created above you can try

 

AverageX(Values(Table[ production line]) , [M1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.