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.
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.
Plant | Order | Start Time | Finish Time |
510 | 1009 | 6:29:00 a. m. | 8:24:00 a. m. |
510 | 1192 | 6:35:00 a. m. | 8:28:00 a. m. |
510 | 1192 | 6:50:00 a. m. | 8:43:00 a. m. |
510 | 1023 | 7:09:00 a. m. | 8:21:00 a. m. |
510 | 1009 | 7:29:00 a. m. | 9:24:00 a. m. |
510 | 1023 | 7:44:00 a. m. | 8:56:00 a. m. |
510 | 1091 | 7:50:00 a. m. | 9:33:00 a. m. |
510 | 1023 | 8:19:00 a. m. | 9:31:00 a. m. |
510 | 1009 | 8:29:00 a. m. | 10:24:00 a. m. |
510 | 1305 | 8:29:00 a. m. | 9:54:00 a. m. |
510 | 1322 | 8:29:00 a. m. | 9:54:00 a. m. |
510 | 1091 | 8:50:00 a. m. | 10:33:00 a. m. |
510 | 1023 | 8:54:00 a. m. | 10:06:00 a. m. |
510 | 1360 | 8: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):
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?
Solved! Go to 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)
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?
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)
Yes, I add an index measure and then another with the info you gave me and it works. Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |