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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
rehman1
Helper I
Helper I

Apply filter on max date and show value of another column based on the filter

Hello,

 

I have a table which looks like shown below. in the last column i want to pull the value which will be the most recent value for column "Monthly_2020" which is "0.43" and the filter appled should be on "Max_Payment" to show most current value. please guide!

Max_PaymentTermed_MembersActive_FlagTotal_CountCumulativeMonthly_2020sum_of_cumulative_2020Cumulative_2020IndexMax_Monthly_2020
01/01/2020 0:00696Termed354746961.96%439761.58%1 
02/01/2020 0:00437Termed3506311331.25%439762.58%2 
03/01/2020 0:00342Termed3488314750.98%439763.35%3 
04/01/2020 0:00245Termed3504717200.70%439763.91%4 
05/01/2020 0:00163Termed3499418830.47%439764.28%5 

06/01/2020

0:00

149Termed3504520320.43%439764.62%6

 

 

 

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

Hi @rehman1 ,

 

v-lionel-msft_0-1597302687780.png

Filter = 
VAR x =  
CALCULATE(
    LASTDATE(Sheet2[Max_Payment]),
    ALL(Sheet2)
)
RETURN
IF(
    MAX(Sheet2[Max_Payment]) = x,
    1, 0
)

 

Best regards,
Lionel Chen

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-lionel-msft
Community Support
Community Support

Hi @rehman1 ,

 

v-lionel-msft_0-1597302687780.png

Filter = 
VAR x =  
CALCULATE(
    LASTDATE(Sheet2[Max_Payment]),
    ALL(Sheet2)
)
RETURN
IF(
    MAX(Sheet2[Max_Payment]) = x,
    1, 0
)

 

Best regards,
Lionel Chen

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

 

amitchandak
Super User
Super User

@rehman1 , try like

calculates(lastnonblankvalue(Date[Date], max(Table[Monthly_2020])), datesmtd(date[date]))

 

allexcept is another alternative

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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