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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NJ81858
Helper IV
Helper IV

DAX Measure for KPI Target Value

Hello,

 

I am trying to create a KPI visual that tracks a value over time compared to the value on the first date. I am trying to have my Target Value be the value on the first date, and the measure that I currently have is not quite working. The measure that I currently have is:

First Value = CALCULATE(SUM('Table'[Balance]), FILTER('Table', [Date] = MIN('Table'[Date])))

 

What the measure is doing currently is just using the most recent value, rather than the first value no matter what.

 

Any help would be greatly appreciated. Thank you in advance!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @NJ81858 

 

You can try the following formula.

First Value =
CALCULATE ( SUM ( 'Table'[Balance] ),
    FILTER ( ALL ( 'Table' ),
        [Date] = CALCULATE ( MIN ( 'Table'[Date] ), ALL ( 'Table' ) )
    )
)

 

Best Regards,

Community Support Team _Charlotte

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-zhangti
Community Support
Community Support

Hi, @NJ81858 

 

You can try the following formula.

First Value =
CALCULATE ( SUM ( 'Table'[Balance] ),
    FILTER ( ALL ( 'Table' ),
        [Date] = CALCULATE ( MIN ( 'Table'[Date] ), ALL ( 'Table' ) )
    )
)

 

Best Regards,

Community Support Team _Charlotte

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

 

mlsx4
Super User
Super User

Hi @NJ81858 

 

I think that you should use ALL inside the filter:

 

First Value = CALCULATE(SUM('Table'[Balance]), FILTER(ALL('Table'), [Date] = MIN('Table'[Date])))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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