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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
bvanderwatt
Helper III
Helper III

Additional filter to restrict data to pull from a certain column

Good Day 

 

I am using the below formula to identify the first date in a product is purchased. 

 

However, I need to add another filter to restrict the data to only pull from a certain column called "Inv+Order." 

 

Based on the below formula, it's including my budgeted quanties. 

 

Any help will be much appreciated. 

@TheoC 

 

FirstTransactionDate =
CALCULATE (
FIRSTDATE ( 'Combined Sales'[InvoiceDate] ),
FILTER ( 'Combined Sales', 'Combined Sales'[StockCode] = EARLIER ( 'Combined Sales'[StockCode]
) ))

 

bvanderwatt_0-1655248392578.png

 

 

2 REPLIES 2
TheoC
Super User
Super User

Hi @bvanderwatt 

 

You should be able to integrate ALLEXCEPT into your filters, something along the lines of:

 

FirstTransactionDate =

CALCULATE (
FIRSTDATE ( 'Combined Sales'[InvoiceDate] ) ,
FILTER ( ALLEXCEPT ( 'Combined Sales' , 'Combined Sales'[Inv+Order] ) , 'Combined Sales'[StockCode] = EARLIER ( 'Combined Sales'[StockCode] )
)
)
 
Hopefully that helps!  Haven't tested syntax so keep me posted.
 
Theo 🙂
 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thank you so mcuh for helping me. I reaaaaally appreciate it. I've been struggling for about 5 hours since you came along 🙂 

 

I've added the calculated column, but i dont understand why it's giving me different "first transaction" dates for the  exact same product. The formula is supposed to give me the first transaction date of when the product was sold. 

 

Also, would it be possible to exclude a certain customer class called "exclude" from this formula. Sometimes I send samples and I've excluded those accounts in my customer class. 

 

bvanderwatt_2-1655249841388.png

 

FirstTransactionDate =
CALCULATE (
FIRSTDATE ( 'Combined Sales'[InvoiceDate] ),
FILTER (
ALLEXCEPT (
'Combined Sales' ,
'Combined Sales'[Inv+Order] ) ,
'Combined Sales'[StockCode] = EARLIER ( 'Combined Sales'[StockCode] ) ) )

 

bvanderwatt_0-1655249620369.png

 

bvanderwatt_1-1655249821767.png

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.