The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
DocNro | CONTACTO FINAL | Empresa | Fecha Ciclo | CONTACTO | MAX | DAX RESULT |
96042136 | 0) Promesa de Pago | PO | 1/7/2022 | 1 | 1 | 1 |
96042136 | 0) Promesa de Pago | PO | 1/6/2022 | 1 | 1 | 1 |
96042136 | 0) Promesa de Pago | PO | 1/5/2022 | 1 | 0 | 1 |
96042136 | 2) Contacto Indirecto | PO | 1/4/2022 | 0 | 1 | 1 |
96042136 | 3) Sin Contacto | PO | 1/3/2022 | 0 | 1 | 1 |
96042136 | 5) Sin Contacto - Sistema F9 | PO | 1/2/2022 | 0 | 1 | 1 |
96042136 | 1) Contacto Directo | PO | 1/1/2022 | 1 | 0 | 0 |
96042136 | 3) Sin Contacto | PO | 1/12/2021 | 0 | 0 | 0 |
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"))
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
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
9 | |
8 |