Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
senthil9324
Frequent Visitor

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.

 

2.PNGCapture3.PNG

 

 

 

 

Thanks in advance.

Senthil.

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
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

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-cherch-msft
Employee
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

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jthomson
Solution Sage
Solution 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

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
Not applicable

The syntax for the RELATED is

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

Can you try this?

 

 

Thanks

Raj

Hi Raj,

 

Tried, but no sucess.

 

Below is the error messsage.

Am not sure what is the exact problem, is this something to do with Many to one relationship model.

Capture1.PNG

Thanks,

Senthil

Anonymous
Not applicable

I think you are using the RELATED() in measure, which wont work.

 

Can you split the activities:

 

1. Create calculated column with Calc Column=RELATED() function.

2. Create second column with the full formula, where you use Calc Column.

 

 

 

Thanks

Raj

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.