Forum Discussion

senthil9324's avatar
senthil9324
Frequent Visitor
8 years ago
Solved

Related Column not showing up while creating a calculated field

Hi Guys,

 

As show below I have 2 table and the relationship is also defined.

 

when I try to write a calculated field using Active weekly field of table "Weekly Active Dealers", the column is not showing up and its throwing error.

 

Could some one help me if some thing is wrong with below model.

 

 

 

 

 

Thanks in advance.

Senthil.

  • Hi senthil9324

     

    You may try to use below measure.

     

    Measure =
    CALCULATE ( COUNT ( 'Opportunity'[Order Created Time] ) )
        / SELECTEDVALUE ( ' Weekly active dealers'[Active Weekly] )

    Regards,

    Cherie

6 Replies

  • jthomson's avatar
    jthomson
    Icon for Solution Sage rankSolution Sage

    Post some data and what you're expecting the result to be, the formula you list makes little sense and the data model isn't helping either

    • senthil9324's avatar
      senthil9324
      Frequent Visitor

      Hi Tomson,

       

      I am trying to calculate weekly average orders by dealer.

       

      Note: Not all dealers get orders on weekly basis, so need to consider only count of distinct dealers who got order in that week.

       

      Opportunity table:

      Order Created TimeWeek RangeDealerSegment
      7/25/2018 15:4707/20/2018 - 07/26/2018YC PowerSports ColumbiaPowersports
      7/23/2018 20:4807/20/2018 - 07/26/2018Bright PowersportsPowersports
      7/23/2018 15:2507/20/2018 - 07/26/2018Bright PowersportsPowersports
      7/22/2018 1:4407/20/2018 - 07/26/2018YC PowerSports ColumbiaOther
      7/20/2018 16:4107/20/2018 - 07/26/2018Love MotorsportsBoats
      7/20/2018 15:2407/20/2018 - 07/26/2018Love MotorsportsBoats
      7/19/2018 14:5407/13/2018 - 07/19/2018YC PowerSports ColumbiaOther
      7/19/2018 14:5407/13/2018 - 07/19/2018Love MotorsportsBoats
      7/18/2018 9:5607/13/2018 - 07/19/2018Wheels in MotionPowersports

       

       

      Weekly active dealers: (created this based on Opportunity table: 

      Week RangeActive Weekly
      07/20/2018 - 07/26/2018139
      07/13/2018 - 07/19/2018124
        

       

      Please let me know if you need any other information.

      • Anonymous's avatar
        Anonymous
        Not applicable

        The syntax for the RELATED is

        RELATED ( 'Weekly active dealers'[Active Weekly]). 

        Can you try this?

         

         

        Thanks

        Raj

  • v-cherch-msft's avatar
    v-cherch-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi senthil9324

     

    You may try to use below measure.

     

    Measure =
    CALCULATE ( COUNT ( 'Opportunity'[Order Created Time] ) )
        / SELECTEDVALUE ( ' Weekly active dealers'[Active Weekly] )

    Regards,

    Cherie