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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Rodando 5 meses gráfico de barras da 6 barras

Hola

Tengo este escenario simple en el que necesito calcular un último 5 meses (sin incluir el mes actual) para una transacción determinada.

Tengo una tabla Fecha y la vinculo a mi tabla de transacciones. Por razones desconocidas, el gráfico muestra una sexta barra en lugar de 5.

¿Podría alguien ayudar a arreglar esto?

El script DAX es:

Acciones TY =

VAR EndDate =

EOMONTH ( HOY (), -1 )

VAR StartDate = EDATE ( EOMONTH ( HOY (), -1 ), -5 ) +1

devolución

CALCULAR (

SUM(UserActions[t_UserActions]),

CALCULATETABLE ( 'Fecha', FILTRO ( 'Fecha', 'Fecha'[Fecha] >= StartDate & 'Fecha' [Fecha] <= EndDate ) ) ) )

Screenshot 2021-03-15 at 14.39.25.png

Muchas gracias,

sujeto

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@GuyA , Pruebe una medida como

Acciones TY =

VAR EndDate =
EOMONTH ( HOY (), -1 )
VAR StartDate = EOMONTH ( HOY (), -6 ) +1

devolución

CALCULAR (

SUM(UserActions[t_UserActions]),FILTER ( 'Fecha', 'Fecha'[Fecha] >= StartDate && 'Fecha'[Fecha] <= EndDate ) )

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@GuyA , Pruebe una medida como

Acciones TY =

VAR EndDate =
EOMONTH ( HOY (), -1 )
VAR StartDate = EOMONTH ( HOY (), -6 ) +1

devolución

CALCULAR (

SUM(UserActions[t_UserActions]),FILTER ( 'Fecha', 'Fecha'[Fecha] >= StartDate && 'Fecha'[Fecha] <= EndDate ) )

¡Brillante! Muchas gracias.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.