Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Don't plot future months

Hi Experts   The following measure gives me data points on a line graph where there is data - if i have no data point i.e. zero or blank - i get a flat line. I want to be able to amend the measure ...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, Anonymous 

    Please try the below.

     

    CurrentYear =
    VAR CurrentYearSales =
    CALCULATE (
    SUM ( 'Test Data_'[cr03a_reportscrimemade] ),
    'Test Data_'[IsCurrentYear] = TRUE (),
    FILTER (
    ALLSELECTED ( 'Test Data_' ),
    [daterelatedcolumninthistable] <= TODAY ()
    )
    )
    RETURN
    IF ( CurrentYearSales = BLANK (), 0, CurrentYearSales )
     
    I hope it works.
     

    Hi, My name is Jihwan Kim.

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