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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ArmandoCasas14
New Member

Cuando comparo los datos de 2 columnas , estos se muestran en las celdas vacias y se cruza

Hola , Tengo una problema cuando comparo datos de 2 años en una tabla, por ejemplo este sku en sales 24 no tiene datos pero si en Sales LY, pero como pueden visualizar el dato de 2023 se corre al 2024 , esto pasa cuando la celda está vacia  y asi se combina mostrando una información erronea en algun año .

  • sales 24 y sales ly  son medidas
  • La informacion de sales (ventas) ambos años salen de una misma columna

 

ArmandoCasas14_0-1725475004509.png

 

ArmandoCasas14_3-1725475208934.png

 

ArmandoCasas14_4-1725475238554.png

 

Alguien me podría ayudar a entender este error ,por favor?

1 ACCEPTED SOLUTION
v-fenling-msft
Community Support
Community Support

Hi, @ArmandoCasas14 

I am glad to help you.

 

The problem you mentioned may be due to the fact that some cells are empty during the calculation process, resulting in misplaced data.

 

Perhaps you can add a judgment to the formula to deal with null values:

 

 

Sales 24 =
VAR z = [Añoactual]
RETURN
    IF (
        ISBLANK ( CALCULATE ( Sales[Ventas], Sales[YY] = z ) ),
        0,
        (
            CALCULATE ( Sales[Ventas], Sales[YY] = z ) / 1000
        ) + 0
    )

 

 

 

 

 

Sales LY =
VAR X = [Añoanterior]
RETURN
    IF (
        ISBLANK ( CALCULATE ( Sales[Ventas], Sales[YY] = X ) ),
        0,
        (
            CALCULATE ( Sales[Ventas], Sales[YY] = X ) / 1000
        ) + 0
    )

 

 

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-fenling-msft
Community Support
Community Support

Hi, @ArmandoCasas14 

I am glad to help you.

 

The problem you mentioned may be due to the fact that some cells are empty during the calculation process, resulting in misplaced data.

 

Perhaps you can add a judgment to the formula to deal with null values:

 

 

Sales 24 =
VAR z = [Añoactual]
RETURN
    IF (
        ISBLANK ( CALCULATE ( Sales[Ventas], Sales[YY] = z ) ),
        0,
        (
            CALCULATE ( Sales[Ventas], Sales[YY] = z ) / 1000
        ) + 0
    )

 

 

 

 

 

Sales LY =
VAR X = [Añoanterior]
RETURN
    IF (
        ISBLANK ( CALCULATE ( Sales[Ventas], Sales[YY] = X ) ),
        0,
        (
            CALCULATE ( Sales[Ventas], Sales[YY] = X ) / 1000
        ) + 0
    )

 

 

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.