Forum Discussion
Calculate solve complaints days without Weekends
- 5 years ago
Hi, Anonymous
Based on your description, you may create two measures like below. The pbix file is attached in the end.
Measure 2 = var tab = ADDCOLUMNS( ALL(Table1), "End", SWITCH( [Status], "Resolved", IF( ISBLANK([Resolved Date]), TODAY(), [Resolved Date] ), "Active",TODAY(), [Created On] ) ) var newtab = ADDCOLUMNS( tab, "Count", COUNTROWS( FILTER( CALENDAR( [Created On], [End] ), NOT(WEEKDAY([Date]) in {1,7}) ) ) ) return SUMX( newtab, [Count] )solved day3 measure = var tab = ADDCOLUMNS( ALL(Table1), "Count", var _end = IF( ISBLANK([Solved Date]), TODAY(), [Solved Date] ) return IF( ISBLANK([Created On]), 0, COUNTROWS( FILTER( CALENDAR( [Created On], _end ), NOT(WEEKDAY([Date]) in {1,7}) ) ) ) ) return SUMX( tab, [Count] )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous you need to change the dates in your tables to DATE format, not DATE/TIME.
Turn off automatic Time Intelligence, then fix your calculated columns to not use the .[Date] syntax.
Then you should probably relate the Date[Date] field from a date table, marked as such, to [Created on] but hard to say because the fields and table in your sample measure above are not what are in the PBIX file you posted.
I couldn't get very far because your source data needs to be modified (first point above) and that is in Power Query where I don't have access to your source data.
- Anonymous5 years agoNot applicable
edhans yes, i did try after changing the format but no luck. Here I am sharing with you the updated report link or if you can share any sample with the required measure would be a great help