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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
kmilarov
Helper II
Helper II

New Table with values from another table from different columns and rows

Hi Guys,

I have a table with many columns, with main data for different Buses , departure / arrival dates and cities. The last 4 columns are calculated date/time of the First (earliest) departure, first (earliest ) arrival , last (latest ) departure and last (latest) arrival for the particular date (per bus). Since one bus performs several trips per day - I have multiple rose per one Bus per day. 
I need to create new table (calculate ) where to list just in one row the general information (bus, arrival date, city) and First (earliest) departure, first (earliest ) arrival , last (latest ) departure and last (latest) arrival - all this in one row per bus / date. 
see attached excel file example here. Sheet 1 is the original table and sheet 2 is the new table I want to create. 
This should be done via DAX. 
many help / ideas - thanks 🙂 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@kmilarov add a new table using the following DAX expression, tweak it as you see fit.

 

Bus New = 
SUMMARIZE ( 
    Bus,
    Bus[Arr. Date],
    Bus[Arr.City],
    Bus[Bus  ],
    "First Dep.First Dep", MAX ( Bus[First Dep.First Dep] ),
    "Last Arr.Last Arr", MAX ( Bus[Last Arr.Last Arr] ),
    "Last Dep.Last Dep", MAX ( Bus[Last Dep.Last Dep] ),
    "First Arr.First Arr", MAX ( Bus[First Arr.First Arr] )
)

 

 

parry2k_0-1692222023614.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

1 REPLY 1
parry2k
Super User
Super User

@kmilarov add a new table using the following DAX expression, tweak it as you see fit.

 

Bus New = 
SUMMARIZE ( 
    Bus,
    Bus[Arr. Date],
    Bus[Arr.City],
    Bus[Bus  ],
    "First Dep.First Dep", MAX ( Bus[First Dep.First Dep] ),
    "Last Arr.Last Arr", MAX ( Bus[Last Arr.Last Arr] ),
    "Last Dep.Last Dep", MAX ( Bus[Last Dep.Last Dep] ),
    "First Arr.First Arr", MAX ( Bus[First Arr.First Arr] )
)

 

 

parry2k_0-1692222023614.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.