Forum

Measure to calculat...
 
Notifications
Clear all

Measure to calculate total cost of courses

3 Posts
2 Users
0 Reactions
139 Views
(@bfaws)
Posts: 8
Active Member
Topic starter
 

Hi,

I have a data model that contains 3 tables - a date table, a table containing a list of course attendees on three different types of courses, and a look up table that shows the cost to run each course.

I have managed to write some measures which show the number of attendees on each of the courses, and the number of times these courses have been run. I`m struggling to write a measure to show the course cost though.  I can bring the course cost into my pivot but get it to multiply by the number of times a specific course has been run.

Please see the attached spreadsheet.  Any help would be much appreciated.

Thanks, 

Brendan

 
Posted : 23/06/2020 8:32 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Brendan,

You were close. When your calculation is iterating over rows you should use one of the X functions, like in this case, SUMX:

Total Course Cost: =SUMX(Course_cost_lookup,[Courses Run] * [Course_cost])

 

Mynda

 
Posted : 23/06/2020 7:22 pm
(@bfaws)
Posts: 8
Active Member
Topic starter
 

Brilliant,

Thank you so much - that has worked perfectly.

Brendan

 
Posted : 24/06/2020 2:08 am
Share: