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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
o59393
Post Prodigy
Post Prodigy

Return latest value regardless of date slicer

Hi all

 

I need to have a measure that returns the latest % value. For example if one value is for March 2019 and the other one for november 2019, the measure should return me the value of november 2019.

 

Regardless of which date you have on the date slicer the condition above should be kept.

 

I created the following dax:

 

 

Most Recent Score = 
CALCULATE(
AVERAGE(NEXT[NEXT]), 
LASTNONBLANK('date'[Start of Month],
AVERAGE(NEXT[NEXT])), 
ALL('date'[Start of Month])
)

 

 

However on my kpi card, is returning me a blanK(), but the value of the example should be 88.43% (value of november in the table):

 

DDSFSDSFS.JPG

 

 

How can I get it right?

 

pbix https://1drv.ms/u/s!ApgeWwGTKtFdhmc6hMVmmqyeKKwZ?e=Lh6sK2

 

Thanks.

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @o59393 ,

 

Please try the following measure.

 

New Measure = 
var max_date = CALCULATE(MAX(NEXT[Date]),ALLSELECTED())
var lastest_ = CALCULATE(AVERAGE(NEXT[NEXT]),FILTER(ALL('date'),'date'[Start of Month]=max_date),ALLSELECTED(facilities))
return
lastest_

 

The result like this,

 

Return 1.jpg

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

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

11 REPLIES 11

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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