Forum Discussion

JBikker's avatar
JBikker
Regular Visitor
8 years ago
Solved

Costs / daycount

Hi there, I'm just starting with Power BI and can't figure out the following.   I have a daycount colomn and a costs colomn. I want to device costs by total daycount. After that I want to multiply...
  • v-frfei-msft's avatar
    v-frfei-msft
    8 years ago

    Hi JBikker,

     

    Here we can take the following steps to meet your requirement.

     

    1. Add a calculated column to get the sum of Daycount per contract.

     

    Sum = CALCULATE(SUM(Subscriptions[Daycount]),FILTER(ALL(Subscriptions),Subscriptions[Part of contract]=EARLIER(Subscriptions[Part of contract])))

    2. Then can need to update the formula as below.

     

    Result = RELATED(Contracts[Costs 2018]) / Subscriptions[Sum] * Subscriptions[Daycount]

     

    For more details, please check the pbix as attached.

     

    https://www.dropbox.com/s/ofd8q15osojrozr/prev2.pbix?dl=0

     

    Regards,

    Frank