Forum Discussion

VikrantC's avatar
VikrantC
Helper I
4 years ago
Solved

Time Intelligence: Previous Month Value is Incorrect

Hi, I have 3 month daily data for 4 players (X1, X2, X3 and Y1).  The data is arranged in 3 columns (Date, Player, Score).  All the players have data for each date (no gaps).   There is no score on ...
  • v-kkf-msft's avatar
    4 years ago

    Hi VikrantC ,

     

    I do not have access to the link you shared, please use SharePoint Online or other tools to share your file.

    Based on my understanding, I created the following example data.

     

     

    1. Then create the measure to calculate the month end score value and compare it to the previous month end.

     

    MonthEndScore = 
    CALCULATE (
        SUM ( 'Table'[Score] ),
        FILTER ( 'Table', 'Table'[Date] = EOMONTH ( 'Table'[Date], 0 ) )
    )
    Score% = 
    IF (
        [MonthEndScore] <> BLANK (),
        DIVIDE (
            [MonthEndScore],
            CALCULATE (
                [MonthEndScore],
                FILTER (
                    ALLSELECTED ( 'Table' ),
                    'Table'[Date] = EOMONTH ( MAX ( 'Table'[Date] ), -1 )
                        && 'Table'[Player] = MAX ( 'Table'[Player] )
                )
            ),
            1
        ) - 1
    )

     

    2. Create the measure to calculate X1*Y1^2.

     

    X1*Y1^2 = 
    CALCULATE ( SUM ( 'Table'[Score] ), 'Table'[Player] = "X1" )
        * CALCULATE ( POWER ( SUM ( 'Table'[Score] ), 2 ), 'Table'[Player] = "Y1" )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • v-kkf-msft's avatar
    v-kkf-msft
    4 years ago

    Hi VikrantC ,

     

    Sorry for the late reply. Please try the following formula:

     

    Measure = 
    CALCULATE ( [Score%], 'Table'[Player] = "X1" )
        * CALCULATE ( POWER ( [Score%], 2 ), 'Table'[Player] = "Y1" )

     

    Best Regards,
    Winniz