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
cottrera
Post Prodigy
Post Prodigy

Fechas entre no funcionar

Hola

Tengo dos mesas una mesa de gastos de reparaciones y una tabla de fechas me gustaría trabajar el gasto entre dos fechas. Ya he resumido el gasto usando Dax esta medida se llama 'Spend' como siempre que mis fechas entre la medida a continuación no está funcionando a los resultados no muestran datos

Trabajos de abril: CALCULATE([Spend], DATESBETWEEN( 'SHARED Calendar'[PKDate],
FECHA(06 ,04 ,2020), DATE(03 , 05 , 2020)))
¿Puede alguien aconsejar lo que estoy haciendo mal.
gracias
Richard
2 ACCEPTED SOLUTIONS
HotChilli
Super User
Super User

Creo que el formato de fecha debe ser

FECHA(<año>, <mes>, <día>)

¿Hay algún error en su fórmula?

View solution in original post

Tahreem24
Super User
Super User

@cottrera ,

Su fórmula parece correcta, excepto por el formato DATE.

Trabajos de abril: CALCULATE([Spend], DATESBETWEEN( 'SHARED Calendar'[PKDate],
FECHA(2020,04 ,06), DATE(2020 , 05 , 02)))
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

3 REPLIES 3
Tahreem24
Super User
Super User

@cottrera ,

Su fórmula parece correcta, excepto por el formato DATE.

Trabajos de abril: CALCULATE([Spend], DATESBETWEEN( 'SHARED Calendar'[PKDate],
FECHA(2020,04 ,06), DATE(2020 , 05 , 02)))
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Mariusz
Community Champion
Community Champion

Hola @cottrera

Crear medidas explícitas para cada mes no más eficiente, pero pruebe lo siguiente.

April jobs = 
VAR __dates = CALENDAR( DATE(06 ,04 ,2020), DATE(03 , 05 , 2020) )
RETURN 
CALCULATE(
    [Spend], 
    TREATAS( __dates, 'SHARED Calendar'[PKDate] )
)

Saludos
Mariusz

Si este post ayuda, entonces considere aceptarlo como la solución.

Por favor, siéntase libre de conectarse conmigo.
Linkedin

HotChilli
Super User
Super User

Creo que el formato de fecha debe ser

FECHA(<año>, <mes>, <día>)

¿Hay algún error en su fórmula?

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.