Home Forums Power Pivot How to use a measure in another table with many to many relationship

This topic contains 1 reply, has 1 voice, and was last updated by  pjmorris 5 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11213

    pjmorris
    Participant
    • Started: 2
    • Replies: 2
    • Total: 4

    Hi,

    I have two tables:

    a Task Table containing [title], [sub title], [booking group] and [effort].  the first three fields are text strings and the fourth is a percentage.

    a Resource Table containing [date], [booking group] and [available effort].

    The Resource Table is linked to a calendar table that allows the effort available per accounting period to be calculated.  Thus for example [booking group]=”ILS” and accounting period AP-1:    [ActualAvailableResource] = 391.29 hours,    which is correct, this measure works for other combinations of [Booking Group] and tblCalendar[Accounting Period].

    I now need to calculate tblTask[effort]*tblResource[ActualAvailableResource], but while it appears to work Calender filter applied by having the [Accounting Period] as a column heading isn’t applied to the tblResource.  If feel that this is because the tblTask isn’t linked to either the tblCalendar or, because of the many to many relationship, to tblResource.

    If anyone can suggest how to go about this I’d be really grateful – I’m happy to share a sanitised version of the data if that will assist (I would just need to create it!).

    Regards

    Peter

    #11214

    pjmorris
    Participant
    • Started: 2
    • Replies: 2
    • Total: 4

    Apologies – I misunderstood what was happening!

    After further investigation I can see that the tblResource is being filtered by the date.  It is not being filtered by [Booking Group].  Ive now tried using the following:

    =sum(tblTasksSimple[Effort])*calculate([ActualAvailableResource],tblResource[Booking Group]) without success.

    and [ActualAvailableResource]=sumx(tblResource,tblResource[Available Hrs]*RELATED(tblCalendar[Daily % of Annual]))

    Hope this helps.

    Regards

    Peter

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Power Pivot’ is closed to new topics and replies.