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
baron33
Frequent Visitor

Un problema para crear un cambio de año interanual

Utilizo la medida rápida para crear un cambio interanual% como se muestra a continuación. (con un filtro Month TM Dec)

Puede ver que cae a -100% en 2019 -- porque no hay datos para 2019 - ¿hay alguna manera de ocultar este -100%?

Capture.JPG

El conjunto de datos tiene este aspecto: (Es por año a mes, pero en 2019, los datos son solo hasta julio, mientras que mi gráfico tiene un filtro de diciembre)

Mes del año

2018 Ene

..

..

..

Dic 2018

2019 Ene

...

2019 Julio

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hola @baron33,

Tal vez pueda intentar empaquetar esta medida con if instrucción para comprobar si la fecha actual existía registros, devolver el resultado de la medida o en blanco basado en if instrucción.

Measure =
IF (
    CALCULATE (
        SUM ( Table[Amount] ),
        ALLSELECTED ( Table ),
        VALUES ( Calendar[date] )
    ) > 0,
    [YOY measure],
    BLANK ()
)

Si esto no ayuda, por favor comparta algunos datos ficticios para probar.

Cómo obtener respuesta rápida a su pregunta

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@baron33 , Tratar como

YOY % á if([Este año]-0 á está en blanco([Este año]),blank(), divide([This Year]-[Last Year],[Last Year]))

Este año es CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]'max('Date'[Year])))
El año pasado : CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]'max('Date'[Year])-1))

Greg_Deckler
Super User
Super User

Filtro para > -99?

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Kudoed Authors