Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

NEED help, measure table creation

Hi people,

 

I am in a pickle.

At the moment I have standard table with calculated columns, "Resource in use (seconds)", "Total per resource" and "Utilization".
 

 

As this table is a calculated table, then it is not possible have the utilization value changing based on user selection. What I have now "discovered" is that, if I would create some of the columns as measure, then I should be able to get to the desired solution.

To calculate "Utilization %", the formula looks like this:

Utilization % = Resource[Worktime total for Resource]/Resource[Capacity (sec)]

As column "Capacity (sec)" is the difference between "Start of use" and "Todays date", then I have not been able to create a measure for that value.

 

My questions would be following:
Can I create a measure, which would read in the data from columns "Start of use" and "Todays date" and then take the diff? I have tried multiple times, but have not succeeded.

Perhaps it is possible to create "Start of use" and "Todays date" for all three resources as measures?

I hope I have made myself clear enough.

 

Best regards
Ramirenter

2 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    Anonymous ,

     

    You may create a measure using dax below:

    Capacity (sec) =
    DATEDIFF ( Resource[Start of use], Resource[Todays date], DAY )
    

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, 

       

      Thanks for the reply. I have already tried that solution and it did not give the desired solution.

      My question was and still is, can I somehow create a measure and assign it three different values as inputs.