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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

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/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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