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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
whulsbergen
Helper II
Helper II

editor de consultas de columna personalizado con if, dates y max statement

¿Cómo agredo una columna en el editor de consultas como lo hice en la columna "fácil" de agregar mediante dax?

Datos:

Entró enValutadatumMaatgevende boekdatumComentario
01-07-201901-01-202001-01-2020 (maxdate)
01-02-202001-01-202001-02-2020 (maxdate)
01-02-202001-01-201931-12-2019año (fecha de la moneda) < año (introducido en)

Esto funcionó:

maatgevende boekdatum ? 

VAR date_1 - 'Presupuesto FM'[Introducido en]

VAR date_boeking - 'Presupuesto FM'[Valutadatum]
VAR year_1 - Año(date_1)
VAR year_boeking á año(date_boeking)
VAR maxdatum á max(date_1;date_boeking)
devolución

IF (year_boeking<year_1;
DATE(year_boeking;12;31); para adiciones anti-fechadas
FECHA(año(maxdatum);month(maxdatum);d ay(maxdatum)))

En el editor de consultas he intentado Agregar columna personalizada usando



else List.Max([Entered on],[Currency Date], tipo de fecha)

pero eso da un error "token comma esperada"

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Le falta paréntesis finales para cerrar #date(

También el List.Max necesita una lista como entrada. Por favor, intente esto en su lugar



else List.Max(-[Ingresado en],[Fecha de la moneda]))




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Employee
Employee

Le falta paréntesis finales para cerrar #date(

También el List.Max necesita una lista como entrada. Por favor, intente esto en su lugar



else List.Max(-[Ingresado en],[Fecha de la moneda]))




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


YES thanks!

With a little shaving to #date this was the final one:

if Date.Year([Valutadatum])<Date.Year([Ingevoerd op]) 
then #date(Date.Year([Ingevoerd op]),12,31)
else List.Max({[Ingevoerd op],[Valutadatum]})

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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