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,
I have data from a tablet press. I have the quinatities produced, please see the below line chart:
The output of the machine should be between 75.000 and 81.000 per hour.
How could I introduce two more lines to see if I am between the targeted tolerance.
I woul like to have the tweo guidlines independent of the real production data.
My data for one day looks like this:
Measurement_Date&Time | Workstation_Name | TabletsProduced_Daily |
05/09/2016 06:29 | Tablet press | 0 |
05/09/2016 09:00 | Tablet press | 9593 |
05/09/2016 09:01 | Tablet press | 9593 |
05/09/2016 09:31 | Tablet press | 14080 |
05/09/2016 09:47 | Tablet press | 34725 |
05/09/2016 10:06 | Tablet press | 58818 |
05/09/2016 10:20 | Tablet press | 73504 |
05/09/2016 10:37 | Tablet press | 94145 |
05/09/2016 10:52 | Tablet press | 111835 |
05/09/2016 11:08 | Tablet press | 133607 |
05/09/2016 11:25 | Tablet press | 153425 |
05/09/2016 11:41 | Tablet press | 170257 |
05/09/2016 11:53 | Tablet press | 184989 |
05/09/2016 12:06 | Tablet press | 199365 |
05/09/2016 12:23 | Tablet press | 220414 |
05/09/2016 12:42 | Tablet press | 241934 |
05/09/2016 12:55 | Tablet press | 256390 |
05/09/2016 13:12 | Tablet press | 277891 |
05/09/2016 13:28 | Tablet press | 297995 |
05/09/2016 13:42 | Tablet press | 312779 |
05/09/2016 14:05 | Tablet press | 341220 |
05/09/2016 14:21 | Tablet press | 359745 |
05/09/2016 14:37 | Tablet press | 376721 |
05/09/2016 14:50 | Tablet press | 392983 |
05/09/2016 15:07 | Tablet press | 412571 |
05/09/2016 15:26 | Tablet press | 433167 |
05/09/2016 15:40 | Tablet press | 446050 |
05/09/2016 15:55 | Tablet press | 462865 |
05/09/2016 16:09 | Tablet press | 480253 |
05/09/2016 16:41 | Tablet press | 502697 |
05/09/2016 17:52 | Tablet press | 505236 |
05/09/2016 18:00 | Tablet press | 506614 |
05/09/2016 18:00 | Tablet press | 506614 |
05/09/2016 18:26 | Tablet press | 506614 |
05/09/2016 18:32 | Tablet press | 521129 |
05/09/2016 18:49 | Tablet press | 540613 |
05/09/2016 19:07 | Tablet press | 559657 |
05/09/2016 19:22 | Tablet press | 579099 |
05/09/2016 19:37 | Tablet press | 595599 |
05/09/2016 20:02 | Tablet press | 623187 |
05/09/2016 20:18 | Tablet press | 643713 |
05/09/2016 20:35 | Tablet press | 661313 |
05/09/2016 20:50 | Tablet press | 683135 |
05/09/2016 21:09 | Tablet press | 705296 |
05/09/2016 21:24 | Tablet press | 720992 |
05/09/2016 21:48 | Tablet press | 744522 |
Thank you for picking up this challenge,
Nandor
Solved! Go to Solution.
Hi Nandor,
I add a measure to get the total working hours and use union function to add new lines to the line chart:
Measure.
Dax:
TotalWorkingHours = var temp=MAX(Sheet1[Measurement_Date&Time]) var mindate=MINX(ALL(Sheet1),Sheet1[Measurement_Date&Time]) return
DATEDIFF(MIN(temp,mindate),MAX(temp,mindate),MINUTE)/60
Table formula:
Table = UNION(
Sheet1,
SELECTCOLUMNS(Sheet1,"Measurement_Date&Time",[Measurement_Date&Time],"Workstation_Name","75000","TabletsProduced_Daily",[TotalWorkingHours]*75000),
SELECTCOLUMNS(Sheet1,"Measurement_Date&Time",[Measurement_Date&Time],"Workstation_Name","81000","TabletsProduced_Daily",[TotalWorkingHours]*81000)
)
Visual:
Regards,
Xiaoxin Sheng
Hi Nandor,
>>The output of the machine should be between 75.000 and 81.000 per hour.
Based on your description, you want to add two constant lines, right?
If as I said, you could following below screenshots:
Regards,
Xiaoxin Sheng
Hi Xiaoxin,
Every hour the output should be between 75.000 and 81.000, this means that we need to add up these valueas every hour, at the end of each shift the value should be 8*75.000 and 8* 81.000.
The line chart should look like:
Best regards,
Nandor
Hi Nandor,
I add a measure to get the total working hours and use union function to add new lines to the line chart:
Measure.
Dax:
TotalWorkingHours = var temp=MAX(Sheet1[Measurement_Date&Time]) var mindate=MINX(ALL(Sheet1),Sheet1[Measurement_Date&Time]) return
DATEDIFF(MIN(temp,mindate),MAX(temp,mindate),MINUTE)/60
Table formula:
Table = UNION(
Sheet1,
SELECTCOLUMNS(Sheet1,"Measurement_Date&Time",[Measurement_Date&Time],"Workstation_Name","75000","TabletsProduced_Daily",[TotalWorkingHours]*75000),
SELECTCOLUMNS(Sheet1,"Measurement_Date&Time",[Measurement_Date&Time],"Workstation_Name","81000","TabletsProduced_Daily",[TotalWorkingHours]*81000)
)
Visual:
Regards,
Xiaoxin Sheng
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 |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |