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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Yura_greenit
Frequent Visitor

copying the date for each individual value

Hello!

I have been working in Power bi for 2 moths, and I have an issue.

I have to show the everyday dislocation of tractors using 1C program (we use it in Ukraine).

Output data:

Date of moving

Tractors

Warehouse location

01.01.2019

Tractor - 1

Warehouse A

05.01.2019

Tractor - 1

Warehouse B

08.01.2019

Tractor - 1

Warehouse C

Date of moving is a date when tractor arrived at a warehouse

Also there is each directory for tractors and warehouses.

As you can see in tab 1 there are no all dates for every day and I need to do something like I showed in tab 2.

Tab 2

Date of moving

Tractors

Warehouse location

01.01.2019

Tractor - 1

Warehouse A

02.01.2019

Tractor - 1

Warehouse A

03.01.2019

Tractor - 1

Warehouse A

04.01.2019

Tractor - 1

Warehouse A

05.01.2019

Tractor - 1

Warehouse B

06.01.2019

Tractor - 1

Warehouse B

07.01.2019

Tractor - 1

Warehouse B

08.01.2019

Tractor - 1

Warehouse C

 

I would be very grateful for your help with DAX or M in finding solution.

1 ACCEPTED SOLUTION

Hi @Yura_greenit 

 

Please see the attached file with the improved code that is grouping Tractors First and then finds next date

 

hope this will solve your problem.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

You can use min(Date of moving), Or while you put information in Matrix or table you can use first value as Agg.

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
Mariusz
Community Champion
Community Champion

Hi @Yura_greenit 

 

Please see the attached file with a solution.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Thank you, Mariusz! You did great job! However, let me ask you one more question. The file I have got from you works good, I copied code to my data and I got another issue.

Lets take a look at tractor 2. From 11.05.2016 it is at warehouse A .
And from 05.06.2016 it moves to warehouse B, but calculated dates work good till 27.05.2016 and then start from 05.06.2016.
In attached file I left this filter.

I would appreciate if you clarify why this code works for you and why not in my file.
link to the file  https://1drv.ms/u/s!AkBOZZMFKBa1k29bSDO7hkS8HcN9?e=XFn6Lu 

Hi @Yura_greenit 

 

Please see the attached file with the improved code that is grouping Tractors First and then finds next date

 

hope this will solve your problem.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Everything works very well. Thanks for help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.