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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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