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
Anonymous
Not applicable

Dinámico (años, trimestres, meses) con dinámica YU, QoQ, MoM

Hola

Tengo una Matriz con el siguiente aspecto:

Matrix_ok_2.JPG

Con el filtro superior puedo elegir entre Año, Trimestre o Mes y todo funciona bien:

Matrix_ok.JPG

El problema es que me gustaría mostrar los encabezados con el siguiente formato:

Año -> 2017, 2018, 2019....

Trimestre -> 2017-Q1, 2017-Q2...

Mes -> 2017-01, 2017-02...

Para ello, cambio la columna Valor de mi Dim_Table auxiliar:

Date table.jpg

Aquí la tabla Matrix funciona bien con las medidas "Total de Entradas" y "Porcentaje":

Total_Tickets_PreviousYear de la casa de la página de
CALCULAR(
DISTINCTCOUNT('Volume Creados'[TaskID]); PREVIOUSYEAR(dim_Date_freq[Valor]))

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hola @ruanolin ,

Puede crear una medida como se muestra a continuación:

Measure =
SWITCH (
    MAX ( 'Format'[Attribute] ),
    "Year", CONCATENATE ( YEAR ( MAX ( 'Format'[Value] ) ), "" ),
    "Quarter", CONCATENATE (
        YEAR ( MAX ( 'Format'[Value] ) ),
        CONCATENATE ( "-Q", QUARTER ( MAX ( 'Format'[Value] ) ) )
    ),
    "Month", CONCATENATE (
        YEAR ( MAX ( 'Format'[Value] ) ),
        CONCATENATE ( "-", MONTH ( MAX ( 'Format'[Value] ) ) )
    )
)

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola @yingyinr

No puedo poner una medida en una columna de una tabla Matrix y si intento con una nueva columna de cálculo la medida "Año anterior" desaprobación:

Error_3.JPG

Hola @ruanolin ,

El valor de medición recién agregado o la columna calculada se reconoce como un valor de texto, ya no es un valor de fecha. Por lo tanto, la función de inteligencia de tiempo PREVIOUSYEAR no funcionará. Si desea calcular Total_Tickets_PreviousYear , puede actualizar su fórmula anterior como se muestra a continuación:

Total_Tickets_PreviousYear =
CALCULATE (
    DISTINCTCOUNT ( 'Volume Creados'[TaskID] );
    PREVIOUSYEAR ( dim_Date_freq[Date] )
)

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hola @yingyinr ,

Tu furmula es la medida inicial que muestro en el post y no funciona.

Error_3.JPG

Es que necesito una medida diferente para calcular la métrica Año anterior.

Hola @ruanolin ,

¿Podría proporcionar su archivo pbix si es conveniente? Gracias.

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.