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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
GustavoKamchen
Frequent Visitor

Production Order Count by Duration

Hello.

 

I need to count the number of production orders by duration time (in hours). The graphic needs to be similar as below. How can I do it in Power BI? Example data is below the example graphic.

 

GustavoKamchen_0-1669232265525.png

 

Production OrderDateDuration (Hours)
1000001/01/20228,244
1000103/01/20229,901
1000205/01/202217,778
1000307/01/202256,094
1000409/01/202247,849
1000511/01/202284,594
1000613/01/202233,581
1000715/01/202242,981
1000817/01/20225,849
1000919/01/202245,459
1001021/01/202279,599
1001123/01/202244,011
1001225/01/202262,425
1001327/01/20221,766
1001429/01/202267,683
1001531/01/202240,150
1001602/02/202231,371
1001704/02/202268,607
1001806/02/202231,655
1001908/02/202247,737
1002010/02/202285,506
1002112/02/202234,627
1002214/02/202227,539
1002316/02/202220,616
1002418/02/202248,829
1002520/02/20228,427
1002622/02/20221,212
1002724/02/202248,016
1002826/02/202278,892
1002928/02/202258,862
1003002/03/202270,599
1003104/03/202283,967
1003206/03/202286,381
1003308/03/202284,822
1003410/03/202272,214
1003512/03/202224,500
1003614/03/202228,981
1003716/03/202255,956
1003818/03/20226,308
1003920/03/202243,098
1004022/03/202251,160
1004124/03/202219,509
1004226/03/202291,068
1004328/03/202234,688
1004430/03/202257,907
1004501/04/202269,639
1004603/04/202260,995
1004705/04/202237,373
1004807/04/202246,522
1004909/04/202216,480
1005011/04/202284,431
1005113/04/202288,376
1005215/04/202293,479
1005317/04/20222,019
1005419/04/202246,137
1005521/04/202227,036
1005623/04/202211,545
1005725/04/202219,773
1005827/04/20227,998
1005929/04/202295,997
1006001/05/202216,988
1006103/05/20221,961
1006205/05/202266,708
1006307/05/202276,575
1006409/05/202291,072
1006511/05/202244,643
1006613/05/202288,635
1006715/05/202296,639
1006817/05/202233,918
1006919/05/202294,219
1007021/05/202292,803
1007123/05/202250,969
1007225/05/202291,084
1007327/05/202258,467
1007429/05/20228,548
1007531/05/202222,628
1007602/06/202272,423
1007704/06/202238,729
1007806/06/202290,074
1007908/06/202251,935
1008010/06/202242,905
1008112/06/202229,085
1008214/06/202266,163
1008316/06/20226,650
1008418/06/202213,723
1008520/06/202288,937
1008622/06/202280,055
1008724/06/202232,041
1008826/06/202248,228
1008928/06/202218,170
1009030/06/20226,320
1009102/07/202246,485
1009204/07/202219,102
1009306/07/202232,448
1009408/07/202282,883
1009510/07/202247,356
1009612/07/202267,273
1009714/07/202219,582
1009816/07/20228,766
1009918/07/2022100,890
1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @GustavoKamchen ,

 

Please try:

First create a new table:

vjianbolimsft_0-1669353952818.png

Then create a measure:

Measure = CALCULATE(COUNT('Table'[Duration (Hours)]),FILTER('Table',[Duration (Hours)]>=MAX('Table 2'[Value])&&[Duration (Hours)]<MAX('Table 2'[Value])+1))

Apply it to the visual:

vjianbolimsft_1-1669354055261.png

Final output:

vjianbolimsft_2-1669354073414.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @GustavoKamchen ,

 

Please try:

First create a new table:

vjianbolimsft_0-1669353952818.png

Then create a measure:

Measure = CALCULATE(COUNT('Table'[Duration (Hours)]),FILTER('Table',[Duration (Hours)]>=MAX('Table 2'[Value])&&[Duration (Hours)]<MAX('Table 2'[Value])+1))

Apply it to the visual:

vjianbolimsft_1-1669354055261.png

Final output:

vjianbolimsft_2-1669354073414.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-jianboli-msft
Community Support
Community Support

Hi @GustavoKamchen ,

 

Please try:

vjianbolimsft_0-1669253450161.png

Final output:

vjianbolimsft_1-1669253467798.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hello.

 

However I need the X axis to be divided in intervals of 1 hour, and count the number of orders in that interval, for example, count the number of orders where the duration time in hours is between 1 and 2, 2 and 3, 3 and 4, and so on.

Ps: The comma is the decimal point.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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