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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
jerryr125
Helper IV
Helper IV

Use the most recent values based upon a date

Hi - I am looking to create a measure to do the following:

 

1. Obtain the most recent values based upon the most recent date (if the Actual column is not null).

2. Upon obtaining the most recent values, perform a calculation.

 

Example Table:

TABLE1234

 

DateActualTarget
2025-0156
2025-0238
2025-03810
2025-04 12
2025-05 15
2025-06 17

 

The result would be for the Date containing the most recent 'Actual Value'

Therefore the measure would use 2025-03

 

Actual = 8

Target = 10

 

Once the two values are known, then divide the Actual / Target.

 

Any thougths ? Jerry

 

1 ACCEPTED SOLUTION

Measure = 
var a = TOPN(1,Filter(ALLSELECTED(Table1234),[Actual]<>BLANK(),[Date],DESC)
return divide(sumx(a,[Actual]),sumx(a,[Target]))

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Like this ?

 

lbendlin_0-1744333787484.png

Measure = 
var d = max(Table1234[Date])
var a = TOPN(1,Filter(ALLSELECTED(Table1234),[Actual]<>BLANK() && [Date]<=d),[Date],DESC)
return divide(sumx(a,[Actual]),sumx(a,[Target]))

Hi @lbendlin  - I appreciate your assistance - thank you.

Almost there - since I am using this in a Card I get an error 'The end of the output was reached'

I only need the one value - this case - the 80%.

 

any thoughts ? Jerry

Measure = 
var a = TOPN(1,Filter(ALLSELECTED(Table1234),[Actual]<>BLANK(),[Date],DESC)
return divide(sumx(a,[Actual]),sumx(a,[Target]))

Hi @jerryr125 ,

 If our response addressed by the community member for  your query, please mark it as Accept Answer and click Yes if you found it helpful.

 

Should you have any further questions, feel free to reach out.

Thank you for being a part of the Microsoft Fabric Community Forum!
 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors