cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ExcelPBI
Post Patron
Post Patron

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]
 
 

ExcelPBI_0-1642634515936.png

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

 

Many thanks in advance

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

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?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur thanks, yes any solution is good as long as its correct.

@Ashish_Mathur any update?

None so far please.  Kindly start a new thread with this question so that someone else may help you.  Sorry.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur no worries, thanks for looking into this.

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!