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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Logistics Forecast Distribution

Hi everyone!

Im trying to forcasting how our trucks are going to be busy in the next day.

The information that I have is the shipping plant (have many), the order and the stimating time of start time of the travel and when is going to finish.

I dont know yet which truck im gonna use for each order until next day, but I need to forecast a day before to see if im not over scheduling.

 

PlantOrderStart TimeFinish Time
51010096:29:00 a. m.8:24:00 a. m.
51011926:35:00 a. m.8:28:00 a. m.
51011926:50:00 a. m.8:43:00 a. m.
51010237:09:00 a. m.8:21:00 a. m.
51010097:29:00 a. m.9:24:00 a. m.
51010237:44:00 a. m.8:56:00 a. m.
51010917:50:00 a. m.9:33:00 a. m.
51010238:19:00 a. m.9:31:00 a. m.
51010098:29:00 a. m.10:24:00 a. m.
51013058:29:00 a. m.9:54:00 a. m.
51013228:29:00 a. m.9:54:00 a. m.
51010918:50:00 a. m.10:33:00 a. m.
51010238:54:00 a. m.10:06:00 a. m.
51013608:55:00 a. m.10:40:00 a. m.

 

This is what i have when the trucks are assigned, so im expecting something similar but with the estimation. (is a custom timeline visual, but if you have a better visual is welcome too):

DylanVelo_0-1664559479123.png

 

What i was thinking is that depending on the start time, write something like a generate series from 1 to X (the numer of truck available), but if i made that measure it just drop me an error:

 

"A table of multiple values was supplied where a single value was expected."

 

Any sugestions?

 

1 ACCEPTED SOLUTION

Let's assume you have index numbers in a column called [IDX] from 1 to n.  Your DAX would be something like

 

Val = 1+MOD([IDX]-1,6)

 

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

you can use table variables in your measure but the final result of the measure must be a scalar value (a table with a single row and a single column).

 

What should the measure compute?

Anonymous
Not applicable

Im expecting to get another column with the numer I set in the what if parameter, get to that number and repeat based on the start time... i mean if I set de number 6, i would get the next information:

1

2

3

4

5

6

1

2

3

4

5

6

1

...

Let's assume you have index numbers in a column called [IDX] from 1 to n.  Your DAX would be something like

 

Val = 1+MOD([IDX]-1,6)

 

 

Anonymous
Not applicable

Yes, I add an index measure and then another with the info you gave me and it works. Thanks!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors