Forum Discussion

Nonzy's avatar
Nonzy
Icon for Helper I rankHelper I
2 years ago
Solved

YOY% total is showing as infinity instead.

Hi , 

 

I am trying to do YOY analysis. I was able to create YOY and YOY% but when showing subtotal for YOY%, I get Infinity instead of the numbers. Can you please help? I have some screenshots below for how it looks and the measure itself. 

 

Thank you in advance. 

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Nonzy 

    Try the following measure.

    MEASURE =
    VAR a =
        SUMX (
            ALLSELECTED ( DPO_PRODUCT_ALLOC_HIST_FE_EAME_VW[Date.N] ),
            [Total Aloc order]
        )
    VAR b =
        SUMX (
            ALLSELECTED ( DPO_PRODUCT_ALLOC_HIST_FE_EAME_VW[Date.N] ),
            [LY Total Aloc order]
        )
    RETURN
        IF (
            ISINSCOPE ( DPO_PRODUCT_ALLOC_HIST_FE_EAME_VW[Date.N] ),
            DIVIDE ( [Total Aloc order], [LY Total Aloc order] ) - 1,
            DIVIDE ( a, b ) - 1
        )
    

    Best Regards!

    Yolo Zhu

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

     

     

7 Replies

  • Hello Nonzy,

     

    The issue is that the total is considering also the empty cells you have in the table above. Try to use HASONEVALUE() in your measure either on YOY or LY Total. 

    Or, you can add CALCULATE ( "your measure YOY%", NOT IS BLANK (YOY))

     

    • Nonzy's avatar
      Nonzy
      Icon for Helper I rankHelper I

      I tried doing the above and created "measure". However, the total now is not correct. Not sure if it is counting all blanks as zeros or what but it shouldn't be 363% based on only 3 results coming. Can you explain more if you have an idea about it? 

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

        Thanks for the solution artur4  provided, and i want to offer some information for user to refer to.

        hello Nonzy , based on your description, you can try to create a new measure.

        Measure =
        SUMX ( VALUES ( DPO_PRODUCT_ALLOC_HIST_FE_EAME_VW[Date.N] ), [YOY%] )
        

        Then put the new measure to the visual.

         

        Best Regards!

        Yolo Zhu

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