Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Subtracting Calculated Columns from Each Other

I have absence data:

IDStartEndDurationDays in MonthWorking DaysLeave EntitlementsDays AvailableAbsenceNet
72702/01/201907/01/2019631232.520.5614.5
72710/03/202011/03/2020231222.519.5217.5
115003/06/201907/08/20196630202.517.57-48.5
115003/06/201907/08/20196630202.517.531-48.5
115003/06/201907/08/20196630202.517.528-48.5

 

Where I'm subtracting [END] - [START] = Duration and then subtracting the ABSENCE from this.

 

However for periods longer than 1 month it groups the total (66 days) rather than individual days (7,31,28) is there a way to get it so the chart is like:

 

IDStartEndDurationDays in MonthWorking DaysLeave EntitlementsDays AvailableAbsenceNet
72702/01/201907/01/2019631232.520.5614.5
72710/03/202011/03/2020231222.519.5217.5
115003/06/201907/08/20196630202.517.5710.5
115003/06/201907/08/20196630202.517.531-13.5
115003/06/201907/08/20196630202.517.528-10.5

 

PBIX attached for better explanation .

https://www.dropbox.com/s/zjizlyun1nuur15/Sample%20Absence.pbix?dl=0

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Have tried

datediff( [START],[END] ,day)

for working day refer : https://www.sqlbi.com/articles/counting-working-days-in-dax/

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.