Forum Discussion

Phobos1's avatar
Phobos1
Icon for Helper I rankHelper I
2 years ago

Calculations across tables

Hello, I am trying to do a calculation across two tables that both relate to a date dimension table. Don't know if it is possible or how to do the dax. There is one table with hours per day per employee that contains the nominal number of hours. Then there is a table with hours by day by employee for absence. Now I need to know the percentage calculated as absence hours divided by nominal hours, and that on a quarter level.
So I figure to sum the absence hours for all employees, sum the nominal hours for all employees and do a division. The result should be an absence % for a particular quarter, the datasets contain data for the past 4 years. Does this work in a measure, and how does it become drillable in the date dimension?

4 Replies

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, Phobos1 

     

    Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

     

    Best Regards,

    Community Support Team _Charlotte

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

  • Hello, thanks for your reply, I have made a ppt to visualize what I mean. I hope it is visible like this, I pasted it in, attaching the file is not an option it seems. Let me know if you need more info, really appreciate the help.

     

    • v-zhangti's avatar
      v-zhangti
      Icon for Community Support rankCommunity Support

      Hi, Phobos1 

       

      Can you provide some of the example data for these tables? Sensitive data can be removed in advance.

       

      Best Regards

  • This was solved with help of a colleage, so topic can be closed.