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
Anonymous
Not applicable

Calculating first order date for by account

hi i have many rows of sales data which lists the account number, the order number (can be multiple order numbers for the same custome rand duplicated order numbers for the same customer). there is also the order date.

 

I need a way to find the first order date for each customer account. is there a simpe way to do this?

 

thanks

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous

 

Try this

 

=
CALCULATE (
    MIN ( TableName[OrderDate] ),
    ALLEXCEPT ( TableName, TableName[Account number] )
)

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous

 

Try this

 

=
CALCULATE (
    MIN ( TableName[OrderDate] ),
    ALLEXCEPT ( TableName, TableName[Account number] )
)

Hi, I'm trying to do something similar but I would exclude orders that have a "0" value (sample orders) and then get the second order date.
I tried the following:

 

First Order Date = CALCULATE(FIRSTDATE('Orders'[Document Date]),ALLEXCEPT('Orders','Orders'[Customer Code]),'Orders'[Revenue]<>0)

 

 

But that is just not showing the first date for customers that have orders = 0, but what I would like to have is the first date of a <>0 order (which in that case would be the second order date).

 

 

Any ideas how I can get that date?

 

Thank you

 

 

 

 

 

 

 

 

Never mind, that calculated column that I mentioned is working fine 🙂

thanks! 

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.