Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

how to truncate graph

I have a measure f(x) and need to create a line graph. let's say f(0)=0, f(1)=1, f(2)=2, f(3)=2.2, f(4)=2.5, f(5)=2.7, f(6)=3, f(7)=3, f(8)=3...f(21)=3. My end users wants to stop graph at a point wh...
  • v-chuncz-msft's avatar
    6 years ago

    Anonymous 

     

    You may add a new measure and take a look at Show items with no data.

    Measure 2 =
    VAR k =
        SELECTEDVALUE ( 'Table'[x] )
    RETURN
        IF (
            [Measure]
                <> CALCULATE (
                    [Measure],
                    TOPN (
                        1,
                        FILTER ( ALLSELECTED ( 'Table'[x] ), 'Table'[x] < k ),
                        'Table'[x], DESC
                    )
                ),
            [Measure]
        )