Forum Discussion

maxduff59's avatar
maxduff59
Helper II
4 years ago
Solved

Plot a graph between two dates

I created two measures which contain : the date of the day and the date of x days before today (x chosen with a slicer). I would like to plot a graph with some dates on x-axis and numeric values on ...
  • SpartaBI's avatar
    4 years ago

    maxduff59 if you will create a measure like:
    MEASURE = 
    VAR _x_days_before_date = [Your Date x days before Measure]
    VAR _date =  [your the date of the day Measure]
    RETURN
    CALCULATE([Your value], DATESBETWEEN('Date Table'[Date], _x_days_before_date,  _date] 

    You would get the y values only for those dates, everything outside will be blank and not presented on the chart and axis will start from your desired start to end.






          

    Showcase Report – Contoso By SpartaBI