Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Problem with shared calendar and multiple uses (different relationships)

Hi All,   This problem is bending my mind, I’m not sure if I’m just too close to it but can’t seem to figure a way around it. I’m convinced I’m missing something simple … so I’m hoping the communit...
  • v-lid-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    We can use the following measure to meet your requirement:

     

    Finance Impact % USERELATIONSHIP = 
    DIVIDE (
        CALCULATE (
            [Project Value Act This Period],
            USERELATIONSHIP ( 'Calendar'[CalendarDate], 'Project Finances'[Reporting Period End] )
        ),
        SUMX (
            DATESINPERIOD (
                'Calendar'[CalendarDate],
                LASTDATE ( 'Calendar'[CalendarDate] ),
                -36,
                MONTH
            ),
            CALCULATE (
                SUM ( 'Project Finances'[Actual Value] ),
                FILTER (
                    ALLSELECTED ( 'Project Finances' ),
                    'Project Finances'[Project Status] = "Closed"
                        && 'Project Finances'[Reporting Period End]
                            IN DISTINCT ( 'Calendar'[CalendarDate] )
                        && 'Project Finances'[Project Creation Date] = [CalendarDate]
                )
            )
        ) / 36,
        0
    )

     

     


    Best regards,