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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

New Column for earliest outlet visited

I have columns ID, Outlet & Date.

 

I would need to come up with a new column call First Transacted Outlet which shows the outlet with the earliest transacted date of the IDs.

IDOutletDate transactedFirst transacted outlet
A1North10-Dec-18North
A1South24-Apr-20North
B4East20-Aug-16East
B4North9-Oct-20East
C7North16-Jan-20West
C7South20-Oct-19West
C7West19-Jul-18West

 

In another table I have the unique ID and Name of customer joining to this table, would I be able to include the new First Transacted Outlet into this table instead? The idea is to reduce the number of rows created per customer.

 

IDDate transactedFirst transacted outlet
A1HarryNorth
B4SamEast
C7CatherineWest

 

Very inexperienced in in PBI so I will appreciate your help. Thank you.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could add a new column to the customer table like

First transacted outlet =
MINX (
    TOPN ( 1, RELATEDTABLE ( Sales ), Sales[Date transacted], ASC ),
    Sales[Outlet]
)

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

You could add a new column to the customer table like

First transacted outlet =
MINX (
    TOPN ( 1, RELATEDTABLE ( Sales ), Sales[Date transacted], ASC ),
    Sales[Outlet]
)
Anonymous
Not applicable

Thank you it works.

 

Just for my knowledge, are you also to provide me a way to include this row into the first table?

I think the below should do it

First transacted outlet =
MINX (
    CALCULATETABLE (
        TOPN ( 1, Sales, Sales[Date transacted], ASC ),
        ALLEXCEPT ( Sales, Sales[ID] )
    ),
    Sales[Outlet]
)

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 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.