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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rsanyoto
Helper III
Helper III

DAX calcular la fecha del filtro más baja que hoy

Hola, chicos

Tengo esta medida DAX, pero necesito agregar un filtro más para obtener resultados de toda la factura de saldo debido donde DueDate es más pequeño que hoy.

Saldo Factura debida Euro - CALCULATE(SUM(Fact_CustLedgerEntryDetailed[Amount]),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[EntryStatus] á "Open"),

FILTER(Fact_CustLedgerEntry, Fact_CustLedgerEntry[DescriptionType] á "Order"),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[CustomerPostingGroup] á "BIN"),

Fact_CustLedgerEntry[DueDate] < Fact_CustLedgerEntry[Hoy]

)

Desgraciadamente esta medida no funciona. ¿Alguna sugerencia?

Muchas gracias

2 REPLIES 2
Adescrit
Impactful Individual
Impactful Individual

Hola @rsanyoto ,

Puede utilizar la función DAX integrada para la fecha de hoy - TODAY().

Vea DAX a continuación:

Saldo Factura debida Euro - CALCULATE(SUM(Fact_CustLedgerEntryDetailed[Amount]),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[EntryStatus] á "Open"),

FILTER(Fact_CustLedgerEntry, Fact_CustLedgerEntry[DescriptionType] á "Order"),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[CustomerPostingGroup] á "BIN"),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[DueDate] < TODAY())

)

Recuerde asegurarse de que su columna de fecha de vencimiento tenga el formato de fecha o fecha/hora.

También es recomendable crear una tabla CALENDAR que contenga una lista de fechas. A continuación, puede crear una relación entre eso y DueDate y filtrar a través de la tabla Calendario. El DAX para eso se vería así:

Saldo Factura debida Euro - CALCULATE(SUM(Fact_CustLedgerEntryDetailed[Amount]),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[EntryStatus] á "Open"),

FILTER(Fact_CustLedgerEntry, Fact_CustLedgerEntry[DescriptionType] á "Order"),

FILTER(Fact_CustLedgerEntry,Fact_CustLedgerEntry[CustomerPostingGroup] á "BIN"),

FILTER(CALENDAR,CALENDAR[Date] < TODAY())

)


Did I answer your question? Mark my post as a solution!
My LinkedIn
parry2k
Super User
Super User

@rsanyoto intente seguir y si no explica lo que no funciona, error o obtener el resultado incorrecto si el resultado incorrecto, a continuación, compartir datos de muestra y la salida esperada

Balance Due Invoice Euro = 
CALCULATE(SUM(Fact_CustLedgerEntryDetailed[Amount]),
Fact_CustLedgerEntry[EntryStatus] = "Open",
Fact_CustLedgerEntry[DescriptionType] = "Order",
Fact_CustLedgerEntry[CustomerPostingGroup] = "BIN",
Fact_CustLedgerEntry[DueDate] < TODAY()
)

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors