Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Another Circular Dependency & Measure returns Last value Anyhelp would be appreciated

Hi Im building a HSE Dashboard and ive only gotten one little hiccup to overcome its building a TRIFR Rate which is more or less a number that we need to know constantly.

 

The calculated column i get a circular dependency error on it on is the following

 

Moving12TRIFR = CALCULATE(SUMX( ALLSELECTED(TRIFR),[Total Recordable Injuries])/SUMX( ALLSELECTED(TRIFR), 'TRIFR'[Total Man Hours])*1000000,
    DATESINPERIOD (
        'Total Recordable Injuries'[Date].[Date],
        LASTDATE ( 'Total Recordable Injuries'[Date] ),
        -12,
        MONTH
    )
)

 And if i use the code on a measure, it only shows the last calculation rather than the value of each row 

 

Any help would be appreciated so i can finish this job off.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Also should say the following measure works however i would like it to be over the life of data not 12 months?

     

     

    TRIFRv102 = (
            CALCULATE (
                SUM ( TRIFR[MTIIncidents] ) + SUM ( TRIFR[LTIIncidents] )
                    ,
                DATESINPERIOD ( TRIFR[Date], LASTDATE ( 'TRIFR'[Date]  ), -12, MONTH )
            )
                * 1000000
        )
            / CALCULATE (
                SUM ( TRIFR[Total Man Hours] ),
                DATESINPERIOD ( TRIFR[Date], LASTDATE ('TRIFR'[Date]  ), -12, MONTH )
            )
    • v-xuding-msft's avatar
      v-xuding-msft
      Icon for Community Support rankCommunity Support

      Hi Anonymous ,

      Does the measure just calculate the values of last 12 months? I tried it in my sample. And it can calculate all the previous values.  Can you please share some sample data and the expected result? Then we will understand your problem clearly.

      How to Get Your Question Answered Quickly

       

      Best Regards,

      Xue Ding

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