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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Mahmoodul
Helper I
Helper I

How can i calculate the date based on max Call closed

Hi Everyone,

I am facing issue when i am trying to create DAX for calculate the date based on max Call closed.Date Which closed most number of call(max_occurance_date).png

Here in above example, if you see red circle , i need this date(date which is max OCB(OCB is nothing but Sb_contractcall))

When i am using my Below DAX,

DAX to calculate max occurance.png

it will give me Blank Value, Can you pleas ehelp to calculate DAX for this.here(OCB=Sb_contractcall Column, Date(ETA column) Blank value.png

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Mahmoodul 

 

Try this measure

Measure = 
VAR maxOCB = CALCULATE(MAX('Table (2)'[OCB]),ALLSELECTED('Table (2)'[Date]))
RETURN
CALCULATE(FIRSTDATE('Table (2)'[Date]),ALL('Table (2)'),'Table (2)'[OCB]=maxOCB)

21120603.jpg

 

In your original measure, maybe no rows can meet the condition [Max_value]=selectedmax, so the result is blank. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Mahmoodul 

 

Try this measure

Measure = 
VAR maxOCB = CALCULATE(MAX('Table (2)'[OCB]),ALLSELECTED('Table (2)'[Date]))
RETURN
CALCULATE(FIRSTDATE('Table (2)'[Date]),ALL('Table (2)'),'Table (2)'[OCB]=maxOCB)

21120603.jpg

 

In your original measure, maybe no rows can meet the condition [Max_value]=selectedmax, so the result is blank. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors