Forum Discussion

agd50's avatar
agd50
Icon for Helper V rankHelper V
3 years ago
Solved

Measure to only show values when the first value appears (Chart)

How do I rewrite this measure so that it will only show the numbers from the beginning of when the values started?

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi agd50 ,

     

    I got an idea. It's to capture the first date which the value is over 0 and then leave the value less than its date blank and the rest the original values.

    For example,

    As required, the value should start in March and be 0 in February. Create the measure.

    Measure = var _mindate=CALCULATE(MIN('Table'[Date]),FILTER(ALLSELECTED('Table'),[Value]>0))
    return IF(MAX('Table'[Date])<_mindate,BLANK(),SUM('Table'[Value]))

    Put the measure in the Y-axis, which starts in March.

     

     

    Best Regards,

    Stephen Tao

     

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi agd50 ,

     

    I got an idea. It's to capture the first date which the value is over 0 and then leave the value less than its date blank and the rest the original values.

    For example,

    As required, the value should start in March and be 0 in February. Create the measure.

    Measure = var _mindate=CALCULATE(MIN('Table'[Date]),FILTER(ALLSELECTED('Table'),[Value]>0))
    return IF(MAX('Table'[Date])<_mindate,BLANK(),SUM('Table'[Value]))

    Put the measure in the Y-axis, which starts in March.

     

     

    Best Regards,

    Stephen Tao

     

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