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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.