Forum Discussion
Using related in a measure
- 8 years ago
Hi,
Try this measure
=CALCULATE(DISTINCTCOUNT(GetIssues[id]),USERELATIONSHIP(GetIssues[Closed_date],DateKey[Date]))
Thank you! I had initially tried this out but when i combine it with additional filters it wouldnt work. Am not sure if my query with filters and calculate is wrong For example :
ClosedBugs = CALCULATE(DISTINCTCOUNT(GetIssues[id]),FILTER(GetIssues,'GetIssues'[issuetype] ="Bug" && 'GetIssues'[Priority] in {P1,P2} ,USERELATIONSHIP(GetIssues[Closed_date],DateKey[Date]))
Hi,
Try this
=CALCULATE(DISTINCTCOUNT(GetIssues[id]),'GetIssues'[issuetype]="Bug",'GetIssues'[Priority]="P1"||'GetIssues'[Priority]="P1", ,USERELATIONSHIP(GetIssues[Closed_date],DateKey[Date]))
- Anonymous8 years agoNot applicable
I settled for adding filters under the visual filters, and just using distinct count and userelationship.
Got stuck with a new problem, am trying to calculate backlog bugs i.e all bugs created before the next month but closed after next month.
My query is the following but i think am going wrong with the order of precendence/filter because my values are way off.
backLogBugs = CALCULATE(DISTINCTCOUNT(GetIssues[id]),Filter(GetIssues, (GetIssues[created]< Related(DateKey(StartofNextMonth) && GetIssues[customfield_10030] > Related(DateKey(StartofNextMonth)) || (GetIssues[created] < Related(DateKey(StartofNextMonth) && GetIssues[status.name] <> "Closed"))
Thanks for you help!
- Ashish_Mathur8 years agoSuper User
Hi,
I am not clear. Share some data and show the expected result.