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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Niiru1
Helper V
Helper V

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

@Niiru1 , Have tried

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors