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
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

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.