Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Everyone,
I am new to Power BI and DAX funcation, I have making report on power BI and I have Load Id number which I used as count function in PB so see how many load I have. Each load have diffrent number but many load number reapeat therefore I used count fucntion to know which stop I have how many load. Now the problem is when I use divide funtion in power BI I get wrong aswer, my percent give me wrong number. I want to make % of OTAS. please see bellow.
3449 | 63% | ||||||
1 | 5467 | 2916 | 4786 | 53% | 88% | ||
2 | 4030 | 1751 | 3171 | 43% | 79% | ||
3 | 1638 | 611 | 1237 | 37% | 76% | ||
4 | 594 | 164 | 422 | 28% | 71% | ||
5 | 227 | 44 | 136 | 19% | 60% | ||
6 | 81 | 12 | 32 | 15% | 40% | ||
7 | 21 | 2 | 9 | 10% | 43% | ||
8 | 3 | 0 | 1 | 0% | 33% | ||
Solved! Go to Solution.
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.
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.
Hi,
I got the solution for this question. Yes I had created two measure.
Thanks for your help.
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..
Proud to be a Super User!
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 |
I am sending you sample PB file too.
Hi Farhan,
Please see sample data excel onedrive link and my current PB status. I am looking to make graph similer to my screen short attached bellow. I also past excel summry work which I want to make on PB and want to create graph base on this summery.
I am new to power BI and new to this forum if you need any futher detail please ask me.
Thanks
Stop | Loads | OTAS | OTAW | OTAS % | OTAW % | ||
1 | 5467 | 2916 | 4786 | 53% | 88% | ||
2 | 4030 | 1751 | 3171 | 43% | 79% | ||
3 | 1638 | 611 | 1237 | 37% | 76% | ||
4 | 594 | 164 | 422 | 28% | 71% | ||
5 | 227 | 44 | 136 | 19% | 60% | ||
6 | 81 | 12 | 32 | 15% | 40% | ||
7 | 21 | 2 | 9 | 10% | 43% | ||
8 | 3 | 0 | 1 | 0% | 33% |
@Anonymous - Hard to tell what is going on from the post. Please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Thanks,
It was my first ever post here but thanks.
@Anonymous , Divide should always be sum(A)/Sum(B). Sum can be count or other aggregation as needed.
% OTAW = divide(Sum('Data (2)'[OTAW]),sum('Data (2)'[Stop No])) //not sure if count is need in one of two
I treied this one earlier but it does not work. I tried again once you mentioned but still not correct answer.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
42 | |
40 |