Forum Discussion
values() filter doesn't pass to the table
I have been fighting with a Dax formula for hours. I wonder if someone can help.
I have an IssueSprint table as below. Each Jira issue is assigned to a sprint (10 work days). Each Sprint has a Start_Date and End_Date, if an issue is not solved during the period, it's passed onto next sprint. Some issues receive story points, which is an workload indicator.
I have 58 story points in Demo Sprint 17, and I expect in each work day 10% issues are solved, so the remaining story points by end of day 1 is 90%*58, by day2, 80%*58 ....
I try to create a measure (guideline) to duplicate this calculation logic, but it doesn't work. sample file: https://www.dropbox.com/s/0rxpfy4gfnxcucm/Jira%20Demo.pbix?dl=0
I think I figured it out.
There was a bug in the divide () part, also I created a dim_issuesprints table for use in the values().
guideline =Var select_date=min(max('Calendar'[Date]),today())var amt=sumx(values(dim_IssueSprints),calculate(max(IssueSprints[story_points])* (1-calculate(divide(if(select_date<max(IssueSprints[Start_Date]),10,if (select_date>max(IssueSprints[End_Date]),10,calculate(sum(Calendar[Workday_BE]),Calendar[Date]<=select_date,Calendar[Date]>=max(IssueSprints[Start_Date])))),10)))))var start_date=minx(values(dim_issuesprints),calculate(max(IssueSprints[Start_Date])))returnamt
2 Replies
- Jeanxyz
Power Participant
I think I figured it out.
There was a bug in the divide () part, also I created a dim_issuesprints table for use in the values().
guideline =Var select_date=min(max('Calendar'[Date]),today())var amt=sumx(values(dim_IssueSprints),calculate(max(IssueSprints[story_points])* (1-calculate(divide(if(select_date<max(IssueSprints[Start_Date]),10,if (select_date>max(IssueSprints[End_Date]),10,calculate(sum(Calendar[Workday_BE]),Calendar[Date]<=select_date,Calendar[Date]>=max(IssueSprints[Start_Date])))),10)))))var start_date=minx(values(dim_issuesprints),calculate(max(IssueSprints[Start_Date])))returnamt - AnonymousNot applicable
HI Jeanxyz,
I'm glad to hear you find the reason and sharing the formula here, I think they may help other who faced the similar issue.
Regards,
Xiaoxin Sheng