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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Stuartm1983
Helper III
Helper III

Comparing working days to expected completion date

Hi,

 

I'm looking to do the following and would love to have some help on this as I don't know how to crack it yet.

 

Basically I have a complaint table as follows:

 

Date (Complaint Made) | Assigned to |Days to Resolve | Date Complaint Resolved | Working Day

1/5/2019                                     Mary                    3                                       4/5/2019                                           1

1/5/2019                                     Bob                       3                                        4/5/2019                                          1

2/5/2019                                     Mary                    3                                       4/5/2019                                           1

2/5/2019                                     Bob                       3                                        4/5/2019                                          1

3/5/2019                                     Bob                       3                                        4/5/2019                                          0

4/5/2019                                     Bob                       3                                        4/5/2019                                          1

.

.

...

 

 

This is built up of 2 tables a complaint dataset and a working day dataset with a date and a binary flag on it only. I merged it using the Date on the left in the modelling section.

 

Now what I want to do is compare the 'days to resolve' to the complaint resolved date. However taking into account days which are not working days and discounting them.

 

Therefore if a manager has taken too long to resolve a complaint accounting for holidays I want that to be summarised and highlighted in a graph or table. Who and by how many days over the date.

 

Could anyone please help me?

 

Thanks 🙂

 

 

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @Stuartm1983

 

I'm not sure whether you need a result as below:

Annotation 2020-02-17 171020.png

The dax expression is as below:

 

 

Column = 
var a=DATEDIFF('Table'[Date (Complaint Made)],'Table'[Date Complaint Resolved ],DAY)
Return
IF('Table'[Working Day]<>0,'Table'[Days to Resolve ]-'Table'[Working Day],'Table'[Days to Resolve ]-a)

 

If not.pls advise me your expected result.

 

 
Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!

Hi Kelly,

 

Thanks for your reply.

 

I don't think I articulated my problem properly.

 

I have the complaints table. 1 row per complaint and a working day look up table (a row per day and set up as a date table), joined on 'Date'.

 

For each row in the dummy table above, I would like to lookup the 1/0's in the working date look up table and sum up the number of working days between the date and resolved date (adding the 1s). Column is called 'Working Day'

 

In practice I have replaced Resolved date with today's date if it hasn't been resolved.

 

I hope this makes sense.

 

Thanks.

 

🙂

JirkaZ
Solution Specialist
Solution Specialist

This will give you a nice idea on how to tackle this:

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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