Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure to subtract a column incorrect

Hi Community,

I have following measure yeilding incorrect result:  Hrs per month is a column & total leaves hours is a measure.

hrs worked = MAX('Emp Leave'[Hrs per month]) - 'Emp Leave'[Total Leave Hours]
 
 

My pbi file:  https://1drv.ms/u/s!Ag919_pO_UKrgSuhQlfClgQZWsbp?e=UIVJ3I

 

Many thanks in advance

6 Replies

  • Hi,

    I'd like to take a different approach to solving this question.

    1. In the Employee leave dataset, I'd create one row for each day of leave.  This can be done in the Query Editor
    2. I'd like to simplify the relationship (instead of One to One and Both, I'd like to use Many to One and Single)
    3. I'd like to simplify the "Total Leave hours" and "Leaves" measures

    This may involve quite  bit of work and will take time.  Are you OK with the first point that i have mentioned above?