Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

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 when f(x) doesn't change it value. In my example I should show only f(0), f(1)..f(6). They don't want to see f(7) on a graph at all. Is it possible?If possible, how can I modify my function?Thanks a lot in advance!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@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]
    )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@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]
    )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.