Forum Discussion
Divide in Power BI
- 6 years ago
Hi FarhanAhmed ,
For the data you share, you may create two measures instead of calculated column like DAX below.
% OTAS = DIVIDE(SUM('Data (2)'[OTAS] ), SUM('Data (2)'[Loads] )) % OTAW = DIVIDE(SUM('Data (2)'[OTAW] ), SUM('Data (2)'[Loads] ))Then you may choose Clustered column chart to display result, put [Stop] into Axis box of chart, put the new created measures [% OTAS] and % OTAW[] into Values box.
Note that the first link you shared can't be opened, and the [Loads] can't be found in your second pbix link, while it appears in forum shared data above, so does it really exist in your data table?
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you please share the sample data with column headers in it ?
Also screenshot would be nice where problem occurs and what number you are expecting..
Hi Farhan,
Are you able to see my data file?
| Stop No | BOL count | BOL | Week | Load Id | Stop # | Stop Type | Stop Window Close | Scheduled Arrival | Scheduled Departure | Scheduled Duration | Actual Arrival | Actual Departure | Actual Duration | Late Arrival Reason Code | Dispatch Time | Depart Gate Time | Actual Gate Time | Day | OTD | OTA to TMS scheduled | OTA to Window |
| 0 | 1 | Y | 48 | 1002019301 | 1 | PK | 2019-12-01 05:04 | 2019-12-01 00:31 | 2019-12-01 01:01 | 3.13 | 2019-11-29 21:22 | 2019-11-30 23:44 | 26.4 | SG - System Generated | 2019-12-01 00:31 | 2019-12-01 01:01 | 2019-11-30 23:44 | 1 | Y | ||
| 1 | 0 | N | 0 | 1002019301 | 2 | DL | 2019-12-01 05:05 | 2019-12-01 02:05 | 2019-12-01 02:35 | 3.13 | 2019-12-01 00:49 | 2019-12-02 10:25 | 33.6 | SG - System Generated | Y | Y | |||||
| 0 | 1 | Y | 49 | 1002020308 | 1 | PK | 2019-12-01 09:59 | 2019-12-01 02:28 | 2019-12-01 02:58 | 7.86 | 2019-11-30 13:25 | 2019-12-01 02:29 | 13.1 | SG - System Generated | 2019-12-01 02:28 | 2019-12-01 02:58 | 2019-12-01 02:29 | 1 | Y | ||
| 1 | 1 | Y | 0 | 1002020308 | 2 | DL | 2019-12-01 07:00 | 2019-12-01 05:30 | 2019-12-01 06:03 | 7.86 | 2019-12-01 04:51 | 2019-12-01 05:38 | 0.8 | SG - System Generated | Y | Y | |||||
| 2 | 1 | Y | 0 | 1002020308 | 3 | DL | 2019-12-01 08:00 | 2019-12-01 06:23 | 2019-12-01 07:03 | 7.86 | 2019-12-01 05:54 | 2019-12-01 06:54 | 1 | SG - System Generated | Y | Y | |||||
| 3 | 0 | N | 0 | 1002020308 | 4 | DL | 2019-12-01 10:00 | 2019-12-01 08:00 | 2019-12-01 08:34 | 7.86 | 2019-12-01 07:54 | 2019-12-01 08:36 | 0.7 | SG - System Generated | Y | Y | |||||
| 0 | 1 | Y | 49 | 1002020312 | 1 | PK | 2019-12-01 12:29 | 2019-12-01 03:21 | 2019-12-01 03:51 | 10.4 | 2019-12-01 13:27 | 2019-12-01 02:23 | <Enter Reason Code> | 2019-12-01 03:21 | 2019-12-01 03:51 | 2019-12-01 02:23 | 1 | Y | |||
| 1 | 1 | Y | 0 | 1002020312 | 2 | DL | 2019-12-01 10:00 | 2019-12-01 07:00 | 2019-12-01 07:36 | 10.4 | 2019-12-01 05:30 | 2019-12-01 06:30 | 1 | NS - Normal Status | Y | Y | |||||
| 2 | 1 | Y | 0 | 1002020312 | 3 | DL | 2019-12-01 11:00 | 2019-12-01 08:03 | 2019-12-01 08:38 | 10.4 | 2019-12-01 07:05 | 2019-12-01 07:53 | 0.8 | SG - System Generated | Y | Y | |||||
| 3 | 0 | N | 0 | 1002020312 | 4 | DL | 2019-12-01 12:30 | 2019-12-01 10:36 | 2019-12-01 11:29 | 10.4 | 2019-12-01 09:50 | 2019-12-01 10:58 | 1.1 | SG - System Generated | Y | Y | |||||
| 0 | 1 | Y | 49 | 1002020320 | 1 | PK | 2019-12-01 08:59 | 2019-12-01 03:28 | 2019-12-01 03:58 | 4.59 | 2019-11-30 14:27 | 2019-12-01 03:29 | 13 | SG - System Generated | 2019-12-01 03:28 | 2019-12-01 03:58 | 2019-12-01 03:29 | 1 | Y | ||
| 1 | 1 | Y | 0 | 1002020320 | 2 | DL | 2019-12-01 08:00 | 2019-12-01 05:00 | 2019-12-01 06:06 | 4.59 | 2019-12-01 04:29 | 2019-12-01 05:13 | 0.7 | SG - System Generated | Y | Y | |||||
| 2 | 0 | N | 0 | 1002020320 | 3 | DL | 2019-12-01 09:00 | 2019-12-01 06:25 | 2019-12-01 07:03 | 4.59 | 2019-12-01 05:41 | 2019-12-01 06:33 | 0.9 | SG - System Generated | Y | Y | |||||
| 0 | 1 | Y | 49 | 1002019866 | 1 | PK | 2019-12-01 09:59 | 2019-12-01 03:55 | 2019-12-01 04:25 | 5.71 | 2019-12-01 13:10 | 2019-12-01 04:38 | <Enter Reason Code> | 2019-12-01 03:55 | 2019-12-01 04:25 | 2019-12-01 04:38 | 1 | N | |||
| 1 | 0 | N | 0 | 1002019866 | 2 | DL | 2019-12-01 08:00 | 2019-12-01 06:00 | 2019-12-01 06:45 | 5.71 | 2019-12-01 06:53 | 2019-12-01 08:01 | 1.1 | SG - System Generated | N | Y |
- Anonymous6 years agoNot applicable
I am sending you sample PB file too.