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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Elmarius123
Regular Visitor

Actual target value

Greetingd Actually, i have a Target value.. this target value should change regarding of month, say in october Target value was 45%, in December it is changed to 65%. When i select November, there should be shown acting Limit, which is 45%(October).

How to write a measure?

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

Hi @Elmarius123 ,

According to your description, I create a sample.

vkalyjmsft_0-1650436875086.png

In my understanding, for the months have no Target, your expected result is to display the target of the most recent month before, here's my solution.

Create a measure.

Actual target =
IF (
    MAX ( 'Table'[Target] ) <> BLANK (),
    MAX ( 'Table'[Target] ),
    MAXX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Index]
                = MAXX (
                    FILTER (
                        ALL ( 'Table' ),
                        'Table'[Index] < MAX ( 'Table'[Index] )
                            && 'Table'[Target] <> BLANK ()
                    ),
                    'Table'[Index]
                )
        ),
        'Table'[Target]
    )
)

Get the result.

vkalyjmsft_1-1650437144697.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Elmarius123 ,

According to your description, I create a sample.

vkalyjmsft_0-1650436875086.png

In my understanding, for the months have no Target, your expected result is to display the target of the most recent month before, here's my solution.

Create a measure.

Actual target =
IF (
    MAX ( 'Table'[Target] ) <> BLANK (),
    MAX ( 'Table'[Target] ),
    MAXX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Index]
                = MAXX (
                    FILTER (
                        ALL ( 'Table' ),
                        'Table'[Index] < MAX ( 'Table'[Index] )
                            && 'Table'[Target] <> BLANK ()
                    ),
                    'Table'[Index]
                )
        ),
        'Table'[Target]
    )
)

Get the result.

vkalyjmsft_1-1650437144697.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Whitewater100
Solution Sage
Solution Sage

Hi:

Can you explain further and show some data? Thanks..

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.