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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Sharmaa
Frequent Visitor

Trying to find out max date with condition

Hi Everyone 

 

I am trying to find out the max date based on two conditions,

i have 5 columns mention below:
as a result what i am trying to achieve is "Max date" for koromiko based on "Jump Number" where i want that system gives the Max date based on jump number "2". 

 

Sharmaa_0-1683600042510.png

 

any help would be appreciated.

thanks 

 

3 REPLIES 3
Mahesh0016
Super User
Super User

@Sharmaa Please Try Below Code
Measure =
MAXX(filter(Table, Table[Jump Number]=2),Table[Date])
####################################################
Measure 2 =
calculate(Max(Table[Date]),allexcept(Table, Table[Jump Number]))

@Sharmaa If this post helps, then please consider Accept it as the solution to help the other members find it more quickly, THANK YOU!!

Hi Mahesh 
thanks for your reply, but as you can see there is two jump number, and what i want that system pick the maxx date first with jump number 2 and if there is no jump number 2 then it's pick the jump number 1.

let me know if that make sense.

thanks 

@Sharmaa Please Try Below Code.
MEASURE 3=
VAR X = calculate(Max(Table[Date]),allexcept(Table, Table[Jump Number])) /
VAR X = MAXX(filter(Table, Table[Jump Number]=2),Table[Date])
VAR Y =calculate(Max(Table[Date]),Table[Jump Number]<MAX(Table[Jump Number]))
RETURN
IF(isblank(Table[Date]),Y,X)

 

@Sharmaa If this post helps, then please consider Accept it as the solution to help the other members find it more quickly, THANK YOU!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.