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! Learn more

Reply
Anonymous
Not applicable

DAX Measure Error - ONLY Return MAX data if all conditions are met

Hi Experts

 

I need to correct the following DAX Measure to ONLY return back max date based three column if MEUIMSTASKID and MEUWONUM and Max Completion Date (Step 1) if Max Completion Date (Step 1) has a a zero based on MEUIMSTASKID and MEUWONUM (Grouping) then no max date if based on MEUIMSTASKID and MEUWONUM grouping are all 1 then meax completion date.

Max Completion Date (Step2) = CALCULATE(MAX('FINCNTRL - Task (AG)'[ACTFINISH]),
                    ALLEXCEPT('FINCNTRL - Task (AG)','FINCNTRL - Task (AG)'[MEUIMSTASKID],'FINCNTRL - Task (AG)'[MEUWONUM]))

apple1111_0-1674474684201.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I'm not clear about your requirement. Are the field [Max Completion Date (Step 1) ] and [ Max Completion Date (Step 2) ] fact field of the table 'FINCNTRL - Task (AG)' ? Or they are calculated columns which we need to get it finally? What's your final expected result? Do you want to display the max complation date group by MEUIMSTASKID and MEUWONUM which the [Max Completion Date (Step 1) ]  is 1, otherwise display null?

yingyinr_0-1674639278049.png

Could you please provide more raw data in your table 'FINCNTRL - Task (AG)' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

I'm not clear about your requirement. Are the field [Max Completion Date (Step 1) ] and [ Max Completion Date (Step 2) ] fact field of the table 'FINCNTRL - Task (AG)' ? Or they are calculated columns which we need to get it finally? What's your final expected result? Do you want to display the max complation date group by MEUIMSTASKID and MEUWONUM which the [Max Completion Date (Step 1) ]  is 1, otherwise display null?

yingyinr_0-1674639278049.png

Could you please provide more raw data in your table 'FINCNTRL - Task (AG)' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Thennarasu_R
Responsive Resident
Responsive Resident

Hi @Anonymous 
try this measure,

Thennarasu_R_0-1674475306967.png

Thanks ,
Thennarasu

Anonymous
Not applicable

Hi Thennarasau_R - I need to show no date as i have 0 for the grouping MEUIMSTASKID and MEUWONUM

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