Forum Discussion
Days Remaining Calculation
- 7 years ago
Oh, that is because of the ALL in that formula. You might try changing that to ALLSELECTED and that might resolve it.
Measure 6 = VAR __today = TODAY() VAR __max = MAX('Table14'[Schedule Date]) VAR __total = SUMX(ALLSELECTED(Table14),Table14[New Qty]) VAR __workdays = SUMX(FILTER(ALL('Calendar'),[Date]>=__today && [Date]<=__max),[IsWorkDay]) RETURN DIVIDE(__total,__workdays,0)Or, you may have to use ALLEXCEPT. Or, you may just use SUMX(Table14,Table14[New Qty]) will depend on exactly what you are trying to do.
I read this over numerous times and am not sure what is going on. Sample data and formulas is always very helpful.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
All of that being said, I have written a number of work duration quick measures like:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Duration/m-p/481543
https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362
Greg_Deckler Sorry that the post is confusing. I was confused myself about how to post this in a better way. I will try to put some sample data and formula that will help you better understand the issue.
Thank you for the references and apologies for the not so well formatted post.