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

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.

Reply
Nandor
Helper I
Helper I

I would need dinamic guidlines in a linechart

Hi,

 

I have data from a tablet press. I have the quinatities produced, please see the below line chart:

 

Capture 1.PNG

 

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&TimeWorkstation_NameTabletsProduced_Daily
05/09/2016 06:29Tablet press0
05/09/2016 09:00Tablet press9593
05/09/2016 09:01Tablet press9593
05/09/2016 09:31Tablet press14080
05/09/2016 09:47Tablet press34725
05/09/2016 10:06Tablet press58818
05/09/2016 10:20Tablet press73504
05/09/2016 10:37Tablet press94145
05/09/2016 10:52Tablet press111835
05/09/2016 11:08Tablet press133607
05/09/2016 11:25Tablet press153425
05/09/2016 11:41Tablet press170257
05/09/2016 11:53Tablet press184989
05/09/2016 12:06Tablet press199365
05/09/2016 12:23Tablet press220414
05/09/2016 12:42Tablet press241934
05/09/2016 12:55Tablet press256390
05/09/2016 13:12Tablet press277891
05/09/2016 13:28Tablet press297995
05/09/2016 13:42Tablet press312779
05/09/2016 14:05Tablet press341220
05/09/2016 14:21Tablet press359745
05/09/2016 14:37Tablet press376721
05/09/2016 14:50Tablet press392983
05/09/2016 15:07Tablet press412571
05/09/2016 15:26Tablet press433167
05/09/2016 15:40Tablet press446050
05/09/2016 15:55Tablet press462865
05/09/2016 16:09Tablet press480253
05/09/2016 16:41Tablet press502697
05/09/2016 17:52Tablet press505236
05/09/2016 18:00Tablet press506614
05/09/2016 18:00Tablet press506614
05/09/2016 18:26Tablet press506614
05/09/2016 18:32Tablet press521129
05/09/2016 18:49Tablet press540613
05/09/2016 19:07Tablet press559657
05/09/2016 19:22Tablet press579099
05/09/2016 19:37Tablet press595599
05/09/2016 20:02Tablet press623187
05/09/2016 20:18Tablet press643713
05/09/2016 20:35Tablet press661313
05/09/2016 20:50Tablet press683135
05/09/2016 21:09Tablet press705296
05/09/2016 21:24Tablet press720992
05/09/2016 21:48Tablet press744522

 

Thank you for picking up this challenge,

Nandor

1 ACCEPTED 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:

 Capture.PNG

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

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:

 

Capture.PNG

Capture2.PNG

 

Capture3.PNG 

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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:

 

Guidelines.PNG

 

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:

 Capture.PNG

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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