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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Ivromero
Regular Visitor

Calculated Column Maxif With Multiple Date Criteria

I need to recreate in Dax the following Formula in order to obtain de Max Value considering multiple date criterias;

 

Excel Formula on Column MAX which has the espected result:

=MAXIFS(E:E;A:A;A2;D:D;"<"&D2;D:D;">="&FECHA.MES(D2;-3))

 

Spected Result:

DocNroCONTACTO FINALEmpresaFecha CicloCONTACTOMAX

DAX RESULT

960421360) Promesa de PagoPO1/7/2022111
960421360) Promesa de PagoPO1/6/2022111
960421360) Promesa de PagoPO1/5/2022101
960421362) Contacto IndirectoPO1/4/2022011
960421363) Sin ContactoPO1/3/2022011
960421365) Sin Contacto - Sistema F9PO1/2/2022011
960421361) Contacto DirectoPO1/1/2022100
960421363) Sin ContactoPO1/12/2021000

 

In Dax Return a wrong value. I implemented this formula;

 

Column = CALCULATE(MAX(MEJOR_CONTACTO[CONTACTO]),
Filter(MEJOR_CONTACTO,MEJOR_CONTACTO[DocNro]=EARLIER(MEJOR_CONTACTO[DocNro])
&&MEJOR_CONTACTO[Fecha Ciclo]<>EARLIER(MEJOR_CONTACTO[Fecha Ciclo])
&&MEJOR_CONTACTO[Fecha Ciclo]<EARLIER(MEJOR_CONTACTO[Fecha Ciclo])
&&MEJOR_CONTACTO[Fecha Ciclo]>=DATEADD(MEJOR_CONTACTO[Fecha Ciclo],-3,MONTH)
&&MEJOR_CONTACTO[Empresa]="POSTA"))

1 REPLY 1
daXtreme
Solution Sage
Solution Sage

@Ivromero 

 

This description is hard to understand. Please be more specific and give good examples that make sense to somebody that sees this the very first time. If you want some guidance on how to post a good question, please consult this post: How to Get Your Question Answered Quickly - Microsoft Power BI Community

Helpful resources

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