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

Mostrar porcentaje de varianza solo hasta que ambos valores de columna estén presentes

Hola

Tengo a continuación la tabla

current Chart.jpg

Datos de muestra:

Data Example.jpg

Estoy luchando para corregir debajo de DAX para mostrar el gráfico como se muestra a continuación.

DAX.jpg

Me gustaría mostrar la varianza% sólo IF(((YearCount-2)&&(NOT(ISBLANK(SecondSelectedValue))), DIVIDE(SecondSelectedValue - FirstSelectedValue, FirstSelectedValue )) ya que tengo 2020 datos sólo hasta hoy(2020-05-W2)

Necesito mostrar Variance% como se muestra en la siguiente tabla.

expected chart.jpg

Por favor, hágamelo saber cómo corregir por encima de DAX para mostrar Variance% sólo hasta la semana actual

¡Gracias!

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

HI @Aswini_C_S

Agregue un condicional en la fórmula como se muestra a continuación:

    IF (
        (
            ( YearCount = 2 )
                && ( NOT ( ISBLANK ( SecondSelectedValue*FirstSelectedValue ) ) )
        ),
        DIVIDE ( SecondSelectedValue - FirstSelectedValue, FirstSelectedValue )
    )

saludos

Lin

Community Support Team _ Lin
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 @v-lili6-msft ,

Gracias por su respuesta!

He actualizado la fórmula según su sugerencia. No funcionó.

Variación de la factura % ?
VAR YearCount CALCULATE(COUNTROWS(FILTERS('Weekly WAMR vs Pumpage'[Year])),ALLSELECTED('Weekly WAMR vs Pumpage'[Year]))
VAR Top1N ?
VALOR (
CALCULAR (
CONCATENATEX ( TOPN ( 1, VALUES ( 'Weekly WAMR vs Pumpage'[Year] ) ), 'Weekly WAMR vs Pumpage'[Year], ", " )
)
)
VAR Top2N ?
VALOR (
CALCULAR (
CONCATENATEX (
TOPN ( 1, VALUES ( 'Weekly WAMR vs Pumpage'[Year] ), 'Weekly WAMR vs Pumpage'[Year], DESC ),
'Weekly WAMR vs Pumpage'[Año],
", "
)
)
)
VAR FirstSelectedValue ?
CALCULATE ( SUM ( 'Weekly WAMR vs Pumpage'[AVG_BILL_CONS_MGD] ), 'Weekly WAMR vs Pumpage'[Year] - Top1N )
VAR SecondSelectedValue ?
CALCULATE ( SUM ( 'Weekly WAMR vs Pumpage'[AVG_BILL_CONS_MGD] ), 'Weekly WAMR vs Pumpage'[Year] - Top2N )
DEVUELVE SI(
(
(Número de año 2)
&&(NOT(ISBLANK(SecondSelectedValue*FirstSelectedValue)))
),
DIVIDE(SecondSelectedValue - FirstSelectedValue, FirstSelectedValue )
)

La línea Still Variance% se muestra en el gráfico para las próximas semanas como 0%.

Variance issue.jpg

hola @Aswini_C_S

Si es posible, podría por favor compartir su archivo pbix de muestra para nosotros tener una prueba, que será una gran ayuda.

saludos

Lin

Community Support Team _ Lin
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 @v-lili6-msft ,

No veo ninguna opción para adjuntar .pbix archivo o archivo de Excel aquí.

Anonymous
Not applicable

Por favor, hágamelo saber cómo adjuntar .pbix archivo y archivo de Excel aquí.

¡Gracias!

saludos

Aswini

hola @Aswini_C_S

Puede cargarlo en OneDrive para la empresa y publicar el vínculo aquí. Enmascare los datos confidenciales antes de cargarlos.

saludos

Lin

Community Support Team _ Lin
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.