line
2 TopicsStop Line on graph from being continuous
I have a table where the costs go up to march and i want to put it on another graph that has a table that goes on until december. When i put it on the y axis, the line goes all the way through to decmeber, how can i get it to stop at march (the green and orange lines)?1KViews0likes1CommentPrediction Line
I need to create a prediction line for how the progress bar should look like. (I am using a line and stacked column chart) In my data table I have begin dates and end dates. I need a measure to choose the earliest and latest dates and create a linear line between it. The yellow line is a new column, but it gives back the correct line in overall view. But as I use slicer or filter it doesn't change (as expected). Here is the code for it: Regression = VAR mind = MIN(Data_Table[Begin Date]) VAR maxd = MAX(Data_Table[End Date]) VAR dat = 'Calendar'[Date] VAR dated = DATEDIFF(mind,maxd,DAY) VAR todated = DATEDIFF(dat,maxd,DAY) VAR fromdated = DATEDIFF(mind,dat,DAY) RETURN IF(AND(fromdated>=0,todated>=0),(DIVIDE(todated,dated)-1)*(-1),IF(fromdated<0,0,1)) After this I tried to create the measure for it, but it doesn't work like it. Here is the code: Regression 2 = VAR mind = MIN(Data_Table[Begin Date]) VAR maxd = MAX(Data_Table[End Date]) VAR dat = SELECTEDVALUE('Calendar'[Date]) VAR dated = DATEDIFF(mind,maxd,DAY) VAR todated = DATEDIFF(dat,maxd,DAY) VAR fromdated = DATEDIFF(mind,dat,DAY) RETURN IF(AND(fromdated>=0,todated>=0),(DIVIDE(todated,dated)-1)*(-1),IF(fromdated<0,0,IF(todated<0,1,0))) I don't mind the spikes on the dates where there is no date (missing column), but the slope start later and before that the value is 1 rather 0. Any help with other approaches as well is much appricated it and have a lovely day.747Views0likes3Comments